Medium java spring

21. How does Spring Boot handle exception translation?

Sample answer: "There are two meanings. Data access: Spring turns technology exceptions like SQLException into its DataAccessException hierarchy, and classes with @Repository get this translation through a post-processor. Web: Boot's /error handling plus @ControllerAdvice turn exceptions into HTTP responses, and Spring supports RFC 9457 ProblemDetail." Editor's note: the web part is not backed by the source below.

Sources (1)
  1. DAO support: Consistent exception hierarchy and @Repository