Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ControllerAdvice
- public class ExceptionHandlingController implements ErrorController{
- private final static String ERROR_PATH = "/error";
- @ExceptionHandler({SQLException.class, DataAccessException.class})
- public String databaseError() {
- return "for-other";
- }
- @ExceptionHandler(Throwable.class)
- public String excepting() {
- return "for-other";
- }
- @Override
- public String getErrorPath() {
- return ERROR_PATH;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement