开发者

How do I turn off exception translation in Spring Roo?

开发者 https://www.devze.com 2023-03-02 13:09 出处:网络
JPA code in Roo\'s entities have their exceptions automatically translated to Spring data exceptions. As I am porting pure JPA code (moving DAO code into the entities as seems to be standard with Roo\

JPA code in Roo's entities have their exceptions automatically translated to Spring data exceptions. As I am porting pure JPA code (moving DAO code into the entities as seems to be standard with Roo's rich domain model), I'd rather not modify the catch blocks for Spring's proprietary exceptions.

Can someone tell me how to turn this o开发者_C百科ff in my entities? The Spring JIRA suggests this is possible, but I don't see how.


Removing the following line in your appcontext doesn't work?

<bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />

I haven't found any traces in roo source to such roo functionality.

0

精彩评论

暂无评论...
验证码 换一张
取 消