我在Java应用程序中使用了以下内容:
但是,在将信任升级到以下内容之后,使用“调用”通配符的所有方面都没有正常工作,因此,已经命中的连接点无法触及,现在:
方面片段如下:
@Before("call(public * com.gam.commons.core.api.services.Service+.(..)) && within(com.gam.calendar.biz.service.internal.impl.)") public void handle(JoinPoint thisJoinPoint) {
`Class declaringType = thisJoinPoint.getSignature().getDeclaringType(); if (declaringType.isInterface()) { UserProfileTO userProfileTO = ((AbstractService) thisJoinPoint.getThis()).getUserProfileTO();/* Caller or this` _`/ ((Service) thisJoinPoint.getTarget()).setUserProfileTO(userProfileTO);/`_ `Callee or target */ } }` 现在,我很高兴地期待着万一你有任何有意义的观点来喂养我。
注意:我的问题是因为别的原因,请看我的答案,收集更多关于这个问题的信息。。
发布于 2015-12-21 12:12:16
我犯了一个错误,因为我的问题完全是由于别的原因造成的。当我更新由JDK 1.8.0_66编译的项目时,我应该重新配置方面-maven-plugin,使其与此升级兼容。幸运的是,通过重新配置POM文件上的适当插件解决了我的问题,如下所示:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.8</version>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.8.7</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>1.8.7</version>
</dependency>
</dependencies>
<configuration>
<complianceLevel>1.8</complianceLevel>
<source>1.8</source>
<target>1.8</target>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>有关"aspectj-maven-plugin“的更多信息可在aspectj plugin上获得。
https://stackoverflow.com/questions/34379321
复制相似问题