79169289

Date: 2024-11-08 08:30:52
Score: 1
Natty:
Report link

Update the View Names in Exception Handling: If your @ExceptionHandler is pointing to a view name like "errorPage", but the template is now in a subdirectory (e.g., resource/templates/error/errorPage.html), you need to update the view name in your exception handler to match the new path:

@ExceptionHandler(Exception.class)
public String handleSomeException() {
    return "error/errorPage";  // updated path
}
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @ExceptionHandler
  • Low reputation (0.5):
Posted by: Shriram Untawale