[Solved] How to handle requests without or with incorrect query parameters [closed]

[ad_1]

The best way to handle this would be:

@RequestParam(name="currency", defaultValue="EUR") String currency

or

@RequestParam(name="currency", required=false) String currency

In second case your should check the existance of currency in your in your controller.

[ad_2]

solved How to handle requests without or with incorrect query parameters [closed]