method中指定com.ssh.service下所有类中以trans开头的方法开启事务,但测试的结果是,该配置对com.ssh.service包下的所有方法都有效,method中name设置的方法过滤不生效,跪求大神解答~~
以下是代码片段
<!-- 开启声明式事务 -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="trans*" propagation="REQUIRED"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut expression="execution(* com.ssh.service.*.*(..))" id="point"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="point"/>
</aop:config>