首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >AspectJ: Weblogic 12发行版

AspectJ: Weblogic 12发行版
EN

Stack Overflow用户
提问于 2015-12-20 08:50:30
回答 1查看 315关注 0票数 0

我在Java应用程序中使用了以下内容:

  • JDK 1.7
  • AspectJ 1.7
  • Weblogic 12.1.3

但是,在将信任升级到以下内容之后,使用“调用”通配符的所有方面都没有正常工作,因此,已经命中的连接点无法触及,现在:

  • JDK标准: 1.8.0_66
  • AspectJ版本: 1.8.7
  • 应用服务器:WebLogic12.2.1

方面片段如下:

@Before("call(public * com.gam.commons.core.api.services.Service+.(..)) && within(com.gam.calendar.biz.service.internal.impl.)") public void handle(JoinPoint thisJoinPoint) {

代码语言:javascript
复制
     `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 */         }     }`  

现在,我很高兴地期待着万一你有任何有意义的观点来喂养我。

注意:我的问题是因为别的原因,请看我的答案,收集更多关于这个问题的信息。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-12-21 12:12:16

我犯了一个错误,因为我的问题完全是由于别的原因造成的。当我更新由JDK 1.8.0_66编译的项目时,我应该重新配置方面-maven-plugin,使其与此升级兼容。幸运的是,通过重新配置POM文件上的适当插件解决了我的问题,如下所示:

代码语言:javascript
复制
<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上获得。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34379321

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档