Would like to ask you a best practice question where a spring-mvc controller is concerned. Please review the code below:
@Autowired
SomeService service;
I would say you have three strategies depending on your use case.
There are roughly three strategies: HandlerExceptionResolver, @ExceptionHandler and handling exceptions internally within action.
The use cases for these are: common exception handler for whole application, whole controller, specific action accordingly.