<bean name="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource"></property> </bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="insert*" propagation="REQUIRED"/>
<tx:method name="update*" propagation="REQUIRED"/>
<tx:method name="delete*" propagation="REQUIRED"/>
<tx:method name="select*" propagation="REQUIRED"/>
</tx:attributes>
</tx:advice>
<aop:config >
<aop:pointcut id="allserviceMethod" expression="execution(* com.hrm.service.*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allserviceMethod"/>
</aop:config>
遇到的异常 execution括号中第一个*号后需加空格,不加空格会报错 Caused by: java.lang.IllegalArgumentException: Pointcut is not well-formed: