Java spring aop仅适用于特定方法
我们需要在我们的项目中实现SpringAOP。在spring配置中是否有任何方法只需要应用aop 一些具体的方法? 例如:我只需要通过SpringAOP对以“create”开头的方法初始化一些变量。例如:createEmployee(雇员); 在spring中不使用aspectJ就可以实现吗?Java spring aop仅适用于特定方法,java,spring-aop,Java,Spring Aop,我们需要在我们的项目中实现SpringAOP。在spring配置中是否有任何方法只需要应用aop 一些具体的方法? 例如:我只需要通过SpringAOP对以“create”开头的方法初始化一些变量。例如:createEmployee(雇员); 在spring中不使用aspectJ就可以实现吗? 清楚吗?或者我应该多解释一下?我该怎么做?我可以对配置应用某种过滤器吗?是的,可以这样做 <tx:advice id="transactionAdvice" transaction-manager=
清楚吗?或者我应该多解释一下?我该怎么做?我可以对配置应用某种过滤器吗?是的,可以这样做
<tx:advice id="transactionAdvice" transaction-manager="hibernateTxManager">
<tx:attributes>
<tx:method name="create*" read-only="false" propagation="REQUIRED" />
</tx:attributes>
</tx:advice>