我正在使用注解来指示需要将建议应用于该方法。在spring中使用批注切入点
我有一个接口,这两种方法称为IMaintenanceDAOSupport
@AuditLogging
void insert(M domainobject, IntResponse response, String statementName);
@AuditLogging
int delete(M domainobject, IntResponse response, String statementName);
我们如何配置方面的XML被应用?
目前我有
<aop:config>
<aop:aspect ref="auditAOP">
<aop:pointcut id="im-insert"
expression="within(IMaintenanceDAOSupport)and execution(@annotation(AuditLogging))"/>
<aop:after method="afterInsertUpdateOrDelete" pointcut-ref="im-insert"/>
</aop:aspect>
</aop:config>
这是给编译错误;你在配置中看到任何错误吗?
“给出编译错误”你看到了什么错误? –
java.lang.IllegalArgumentException:切入点结构不正确:在字符位置期待“名称模式”139 – user2434