This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

However as the ExceptionHandler method is applied to a full class then you can not mix and match ajax and non ajax methods as the exception handler either needs to either return a view OR a response body.

Comment

Thank you for your response, however I have read the documentation previously and already have working @ExceptionHandler methods in my controllers, however it still doesn't solve my specific problem as per above posts. I have resorted to using a try catch in each method that needs specific exception behaviour, and for the methods where that same exception can use a more general/catchall exception behaviour, I will let my @ExceptionHandler method handle it.