【发布时间】:2010-12-29 23:53:08
【问题描述】:
<context:annotation-config/>
<context:component-scan...
这用于我需要用@Repository @Service @Component 注释的类...
<context:spring-configured />
<context:component-scan...
如果我需要使用@Configurable,请使用
<tx:annotation-driven transaction-manager="transactionManager" />
<context:component-scan...
如果我需要 @Transactional 则使用,除此之外,我还需要在 xml 中添加哪些其他元数据才能使用事务管理?
<bean
class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
在 xml 中添加这个需要什么?目的是什么?
【问题讨论】:
标签: java spring transactions annotations