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.

Not enabling Exception Translation with Spring Data?

Nov 26th, 2012, 04:33 AM

According to the doc an @Repository annotation is required to activate Exception Translation:
§2.1.1 "Beyond that it activates persistence exception translation for all beans annotated with @Repository to let exceptions being thrown by the JPA presistence providers be converted into Spring's
DataAccessException hierarchy."

When I try this with a mini-example, it translates the exceptions even without @Repository: