2015-12-20 39 views
0

我對Java EE應用程序曾與以下CONFIGS:AspectJ的:問題Weblogic上12

  • JDK 1.7
  • AspectJ的1.7
  • 的Weblogic 12.1.3

然而,升級後配置如下,使用「呼叫」通配符的所有方面都無法正常工作,因此,現在沒有可以觸及的連接點:

  • JDK優化版本:1.8.0_66
  • AspectJ的版本:1.8.7
  • 應用服務器:Weblogic的12.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) {
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 */ } }

現在,如果您有任何有意義的觀點可以幫助我,我會非常高興地期待您的到來。


注意:我的問題是由於別的事情,請看看我的答案,以收集有關問題的更多信息。

回答

1

我犯了一個錯誤,因爲我的問題完全是由於別的。當我更新了我的項目並由JDK 1.8.0_66進行編譯時,我應該重新配置aspect-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的插件」的更多信息,請上aspectj-maven-plugin

+1

您可以接受你的自己的答案,以關閉這個問題。 – kriegaex