transactions

Spring @Transactional on @Bean declaration instead of class Implementation

南笙酒味 提交于 2020-11-26 14:52:39
问题 I'd like to configure "transactional" beans from my Spring @Configuration class instead of annotating the class implementation itself with @Transactional . Kind of like the old school way, configuring transactional advice from an XML file, but without needing a String reference to my class/method names to create pointcuts. The reason is that the bean implementation is in another code base, and the module it belongs to doesn't depend on Spring. Read : I'm not touching the source code of that