In Spring Boot, a custom error response can be returned from an exception handler by returning an instance of _____.

  • Exception
  • Model
  • ModelAndView
  • ResponseEntity
In Spring Boot, when you want to return a custom error response from an exception handler, you can do so by returning an instance of ResponseEntity. This allows you to customize the HTTP status code, headers, and response body to provide detailed error information.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *