当前位置: 首页 > 知识库问答 >
问题:

gradle+AspectJ--编织外部jar时出现编译错误

闾丘山
2023-03-14

我有一个使用编译时编织方面的项目,它依赖于两个外部JAR。我从https://github.com/eveoh/gradle-aspectj使用gradle-aspectj插件

按以下方式生成.分级:

buildscript {
    repositories {
        maven { url "http://nexus.**.org/nexus/content/groups/public/" }
    }
    dependencies {
        classpath("nl.eveoh:gradle-aspectj:1.5")
    }
}

ext {
    springBootVersion = '1.2.3.RELEASE'
    aspectjVersion = '1.8.5'
}

apply plugin: 'aspectj'

compileAspect {
    additionalAjcArgs = ['encoding': 'UTF-8', 'source': '1.8', 'target': '1.8']
}

dependencies {                       
    compile ("com.alibaba:fastjson:1.2.5")
    compile ('commons-io:commons-io:2.4')
    compile ('commons-lang:commons-lang:2.6')
    compile ("ch.qos.logback:logback-classic:1.1.3")
    compile ("ch.qos.logback:logback-core:1.1.3")
    compile ("org.springframework:spring-jms:4.1.6.RELEASE")
    compile ("org.apache.kafka:kafka-clients:0.8.2.2")
    compile ("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
    compile ("org.aspectj:aspectjrt:$aspectjVersion")
    compile ("org.aspectj:aspectjweaver:$aspectjVersion")

    compile("com.aa.bb:bb-core:1.0")
    ajInpath ("com.aa.bb:bb-core:1.0")
}
20:35:12: Executing external task 'build'...
:myproject:compileAspect
[ant:iajc] trouble in: 
[ant:iajc] public class org.springframework.http.converter.feed.AtomFeedHttpMessageConverter extends org.springframework.http.converter.feed.AbstractWireFeedHttpMessageConverter:
[ant:iajc]   public void <init>():
[ant:iajc]                     ALOAD_0     // Lorg/springframework/http/converter/feed/AtomFeedHttpMessageConverter; this   (line 38)
[ant:iajc]                     NEW org.springframework.http.MediaType
[ant:iajc]                     DUP
[ant:iajc]                     LDC "application"
[ant:iajc]                     LDC "atom+xml"
[ant:iajc]                     INVOKESPECIAL org.springframework.http.MediaType.<init> (Ljava/lang/String;Ljava/lang/String;)V
[ant:iajc]                     INVOKESPECIAL org.springframework.http.converter.feed.AbstractWireFeedHttpMessageConverter.<init> (Lorg/springframework/http/MediaType;)V
[ant:iajc]     constructor-execution(void org.springframework.http.converter.feed.AtomFeedHttpMessageConverter.<init>())
[ant:iajc]     |               RETURN   (line 39)
[ant:iajc]     constructor-execution(void org.springframework.http.converter.feed.AtomFeedHttpMessageConverter.<init>())
[ant:iajc]   end public void <init>()
[ant:iajc] 
[ant:iajc]   protected boolean supports(Class):
[ant:iajc]     method-execution(boolean org.springframework.http.converter.feed.AtomFeedHttpMessageConverter.supports(java.lang.Class))
[ant:iajc]     |               LDC com.sun.syndication.feed.atom.Feed   (line 43)
[ant:iajc]     |               ALOAD_1     // Ljava/lang/Class; clazz
[ant:iajc]     | method-call(boolean java.lang.Class.isAssignableFrom(java.lang.Class))
[ant:iajc]     | |             INVOKEVIRTUAL java.lang.Class.isAssignableFrom (Ljava/lang/Class;)Z
[ant:iajc]     | method-call(boolean java.lang.Class.isAssignableFrom(java.lang.Class))
[ant:iajc]     |               IRETURN
[ant:iajc]     method-execution(boolean org.springframework.http.converter.feed.AtomFeedHttpMessageConverter.supports(java.lang.Class))
[ant:iajc]   end protected boolean supports(Class)
[ant:iajc] 
[ant:iajc] end public class org.springframework.http.converter.feed.AtomFeedHttpMessageConverter
[ant:iajc] 
[ant:iajc]  
[ant:iajc] Exception thrown from AspectJ 1.8.5
[ant:iajc] 
[ant:iajc] This might be logged as a bug already -- find current bugs at
[ant:iajc]   http://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component=Compiler
[ant:iajc] 
[ant:iajc] Bugs for exceptions thrown have titles File:line from the top stack, 
[ant:iajc] e.g., "SomeFile.java:243"
[ant:iajc] 
[ant:iajc] If you don't find the exception below in a bug, please add a new bug
[ant:iajc] at http://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ
[ant:iajc] To make the bug a priority, please include a test program
[ant:iajc] that can reproduce this exception.
[ant:iajc] org.aspectj.weaver.MissingResolvedTypeWithKnownSignature cannot be cast to org.aspectj.weaver.ReferenceType
[ant:iajc] 
[ant:iajc] when weaving type org.springframework.http.converter.feed.AtomFeedHttpMessageConverter
[ant:iajc] when weaving classes 
[ant:iajc] when weaving 
[ant:iajc] when batch building BuildConfig[null] #Files=49 AopXmls=#0
[ant:iajc] org.aspectj.weaver.MissingResolvedTypeWithKnownSignature cannot be cast to org.aspectj.weaver.ReferenceType
[ant:iajc] java.lang.ClassCastException: org.aspectj.weaver.MissingResolvedTypeWithKnownSignature cannot be cast to org.aspectj.weaver.ReferenceType
[ant:iajc]  at org.aspectj.weaver.BoundedReferenceType.parameterize(BoundedReferenceType.java:109)
[ant:iajc]  at org.aspectj.weaver.ResolvedType.parameterize(ResolvedType.java:2489)
[ant:iajc]  at org.aspectj.weaver.ResolvedMemberImpl.parameterize(ResolvedMemberImpl.java:897)
[ant:iajc]  at org.aspectj.weaver.ResolvedMemberImpl.parameterizedWith(ResolvedMemberImpl.java:794)
[ant:iajc]  at org.aspectj.weaver.ResolvedMemberImpl.parameterizedWith(ResolvedMemberImpl.java:742)
[ant:iajc]  at org.aspectj.weaver.ReferenceType.getDeclaredMethods(ReferenceType.java:859)
[ant:iajc]  at org.aspectj.weaver.ResolvedType$MethodGetterIncludingItds.get(ResolvedType.java:252)
[ant:iajc]  at org.aspectj.weaver.ResolvedType$MethodGetterIncludingItds.get(ResolvedType.java:250)
[ant:iajc]  at org.aspectj.weaver.Iterators$4$1.hasNext(Iterators.java:213)
[ant:iajc]  at org.aspectj.weaver.Iterators$4.hasNext(Iterators.java:230)
[ant:iajc]  at org.aspectj.weaver.ResolvedType.lookupResolvedMember(ResolvedType.java:619)
[ant:iajc]  at org.aspectj.weaver.JoinPointSignatureIterator.findSignaturesFromSupertypes(JoinPointSignatureIterator.java:192)
[ant:iajc]  at org.aspectj.weaver.JoinPointSignatureIterator.hasNext(JoinPointSignatureIterator.java:68)
[ant:iajc]  at org.aspectj.weaver.patterns.SignaturePattern.matches(SignaturePattern.java:317)
[ant:iajc]  at org.aspectj.weaver.patterns.KindedPointcut.matchInternal(KindedPointcut.java:197)
[ant:iajc]  at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:137)
[ant:iajc]  at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:56)
[ant:iajc]  at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:137)
[ant:iajc]  at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:56)
[ant:iajc]  at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:137)
[ant:iajc]  at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:113)
[ant:iajc]  at org.aspectj.weaver.Advice.match(Advice.java:109)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:152)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:3304)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2692)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:480)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:100)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1689)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1633)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1398)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1184)
[ant:iajc]  at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.weaveQueuedEntries(AjPipeliningCompilerAdapter.java:514)
[ant:iajc]  at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.queueForWeaving(AjPipeliningCompilerAdapter.java:447)
[ant:iajc]  at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.afterProcessing(AjPipeliningCompilerAdapter.java:432)
[ant:iajc]  at org.aspectj.ajdt.internal.compiler.CompilerAdapter.ajc$after$org_aspectj_ajdt_internal_compiler_CompilerAdapter$5$6b855184(CompilerAdapter.aj:103)
[ant:iajc]  at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:822)
[ant:iajc]  at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:480)
[ant:iajc]  at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:420)
[ant:iajc]  at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1036)
[ant:iajc]  at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:272)
[ant:iajc]  at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:185)
[ant:iajc]  at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112)
[ant:iajc]  at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60)
[ant:iajc]  at org.aspectj.tools.ajc.Main.run(Main.java:371)
[ant:iajc]  at org.aspectj.tools.ajc.Main.runMain(Main.java:248)
[ant:iajc]  at org.aspectj.tools.ajc.Main.main(Main.java:84)
[ant:iajc] 
[ant:iajc] trouble in: 
[ant:iajc] public class org.springframework.http.converter.feed.RssChannelHttpMessageConverter extends org.springframework.http.converter.feed.AbstractWireFeedHttpMessageConverter:
[ant:iajc]   public void <init>():
[ant:iajc]                     ALOAD_0     // Lorg/springframework/http/converter/feed/RssChannelHttpMessageConverter; this   (line 38)
[ant:iajc]                     NEW org.springframework.http.MediaType
[ant:iajc]                     DUP
[ant:iajc]                     LDC "application"
[ant:iajc]                     LDC "rss+xml"
[ant:iajc]                     INVOKESPECIAL org.springframework.http.MediaType.<init> (Ljava/lang/String;Ljava/lang/String;)V
[ant:iajc]                     INVOKESPECIAL org.springframework.http.converter.feed.AbstractWireFeedHttpMessageConverter.<init> (Lorg/springframework/http/MediaType;)V
[ant:iajc]     constructor-execution(void org.springframework.http.converter.feed.RssChannelHttpMessageConverter.<init>())
[ant:iajc]     |               RETURN   (line 39)
[ant:iajc]     constructor-execution(void org.springframework.http.converter.feed.RssChannelHttpMessageConverter.<init>())
[ant:iajc]   end public void <init>()
[ant:iajc] 
[ant:iajc]   protected boolean supports(Class):
[ant:iajc]     method-execution(boolean org.springframework.http.converter.feed.RssChannelHttpMessageConverter.supports(java.lang.Class))
[ant:iajc]     |               LDC com.sun.syndication.feed.rss.Channel   (line 43)
[ant:iajc]     |               ALOAD_1     // Ljava/lang/Class; clazz
[ant:iajc]     | method-call(boolean java.lang.Class.isAssignableFrom(java.lang.Class))
[ant:iajc]     | |             INVOKEVIRTUAL java.lang.Class.isAssignableFrom (Ljava/lang/Class;)Z
[ant:iajc]     | method-call(boolean java.lang.Class.isAssignableFrom(java.lang.Class))
[ant:iajc]     |               IRETURN
[ant:iajc]     method-execution(boolean org.springframework.http.converter.feed.RssChannelHttpMessageConverter.supports(java.lang.Class))
[ant:iajc]   end protected boolean supports(Class)
[ant:iajc] 
[ant:iajc] end public class org.springframework.http.converter.feed.RssChannelHttpMessageConverter
[ant:iajc] 
[ant:iajc]  
[ant:iajc] Exception thrown from AspectJ 1.8.5
[ant:iajc] 
[ant:iajc] This might be logged as a bug already -- find current bugs at
[ant:iajc]   http://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component=Compiler
[ant:iajc] 
[ant:iajc] Bugs for exceptions thrown have titles File:line from the top stack, 
[ant:iajc] e.g., "SomeFile.java:243"
[ant:iajc] 
[ant:iajc] If you don't find the exception below in a bug, please add a new bug
[ant:iajc] at http://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ
[ant:iajc] To make the bug a priority, please include a test program
[ant:iajc] that can reproduce this exception.
[ant:iajc] org.aspectj.weaver.MissingResolvedTypeWithKnownSignature cannot be cast to org.aspectj.weaver.ReferenceType
[ant:iajc] 
[ant:iajc] when weaving type org.springframework.http.converter.feed.RssChannelHttpMessageConverter
[ant:iajc] when weaving classes 
[ant:iajc] when weaving 
[ant:iajc] when batch building BuildConfig[null] #Files=49 AopXmls=#0
[ant:iajc] org.aspectj.weaver.MissingResolvedTypeWithKnownSignature cannot be cast to org.aspectj.weaver.ReferenceType
[ant:iajc] java.lang.ClassCastException: org.aspectj.weaver.MissingResolvedTypeWithKnownSignature cannot be cast to org.aspectj.weaver.ReferenceType
[ant:iajc]  at org.aspectj.weaver.BoundedReferenceType.parameterize(BoundedReferenceType.java:109)
[ant:iajc]  at org.aspectj.weaver.ResolvedType.parameterize(ResolvedType.java:2489)
[ant:iajc]  at org.aspectj.weaver.ResolvedMemberImpl.parameterize(ResolvedMemberImpl.java:897)
[ant:iajc]  at org.aspectj.weaver.ResolvedMemberImpl.parameterizedWith(ResolvedMemberImpl.java:794)
[ant:iajc]  at org.aspectj.weaver.ResolvedMemberImpl.parameterizedWith(ResolvedMemberImpl.java:742)
[ant:iajc]  at org.aspectj.weaver.ReferenceType.getDeclaredMethods(ReferenceType.java:859)
[ant:iajc]  at org.aspectj.weaver.ResolvedType$MethodGetterIncludingItds.get(ResolvedType.java:252)
[ant:iajc]  at org.aspectj.weaver.ResolvedType$MethodGetterIncludingItds.get(ResolvedType.java:250)
[ant:iajc]  at org.aspectj.weaver.Iterators$4$1.hasNext(Iterators.java:213)
[ant:iajc]  at org.aspectj.weaver.Iterators$4.hasNext(Iterators.java:230)
[ant:iajc]  at org.aspectj.weaver.ResolvedType.lookupResolvedMember(ResolvedType.java:619)
[ant:iajc]  at org.aspectj.weaver.JoinPointSignatureIterator.findSignaturesFromSupertypes(JoinPointSignatureIterator.java:192)
[ant:iajc]  at org.aspectj.weaver.JoinPointSignatureIterator.hasNext(JoinPointSignatureIterator.java:68)
[ant:iajc]  at org.aspectj.weaver.patterns.SignaturePattern.matches(SignaturePattern.java:317)
[ant:iajc]  at org.aspectj.weaver.patterns.KindedPointcut.matchInternal(KindedPointcut.java:197)
[ant:iajc]  at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:137)
[ant:iajc]  at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:56)
[ant:iajc]  at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:137)
[ant:iajc]  at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:56)
[ant:iajc]  at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:137)
[ant:iajc]  at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:113)
[ant:iajc]  at org.aspectj.weaver.Advice.match(Advice.java:109)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:152)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:3304)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2692)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:480)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:100)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1689)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1633)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1398)
[ant:iajc]  at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1184)
[ant:iajc]  at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.weaveQueuedEntries(AjPipeliningCompilerAdapter.java:514)
[ant:iajc]  at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.queueForWeaving(AjPipeliningCompilerAdapter.java:447)
[ant:iajc]  at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.afterProcessing(AjPipeliningCompilerAdapter.java:432)
[ant:iajc]  at org.aspectj.ajdt.internal.compiler.CompilerAdapter.ajc$after$org_aspectj_ajdt_internal_compiler_CompilerAdapter$5$6b855184(CompilerAdapter.aj:103)
[ant:iajc]  at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:822)
[ant:iajc]  at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:480)
[ant:iajc]  at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:420)
[ant:iajc]  at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1036)
[ant:iajc]  at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:272)
[ant:iajc]  at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:185)
[ant:iajc]  at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112)
[ant:iajc]  at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60)
[ant:iajc]  at org.aspectj.tools.ajc.Main.run(Main.java:371)
[ant:iajc]  at org.aspectj.tools.ajc.Main.runMain(Main.java:248)
[ant:iajc]  at org.aspectj.tools.ajc.Main.main(Main.java:84)
[ant:iajc] 
[ant:iajc] 九月 08, 2016 8:35:41 下午 org.aspectj.weaver.tools.Jdk14Trace info
[ant:iajc] 信息: Dumping to D:\***\.\ajcore.20160908.203541.662.txt
[ant:iajc] 
[ant:iajc] 2 fail|aborts
:myproject-common:compileAspect FAILED
 ajInpath ("com.aa.bb:bb-core:1.0")

我的项目基于intellij idea(16)+gradle(2.12)+spring boot(1.2.3)

任何帮助都将不胜感激。

========================================================================

在我添加spring-framework排除之后,没有编译错误,但是外部jar仍然没有被编织。

ajInpath ("com.aa.bb:bb-core:1.0"){
    exclude(group: "org.springframework")
}

共有1个答案

彭梓
2023-03-14

我终于算出了^_^。由于我的项目有多个模块,所以我将aspectj配置内容移到根模块。最终的gradle脚本是:

buildscript {
    repositories {
        maven { url "http://nexus.**.org/nexus/content/groups/public/" }
    }
    dependencies {
        classpath("nl.eveoh:gradle-aspectj:1.5")
    }
}

ext {
    springBootVersion = '1.2.3.RELEASE'
    aspectjVersion = '1.8.5'
}

apply plugin: 'aspectj'

dependencies {                  
    def appBizPath = project(':my-app-business').projectDir
    def webBizPath = project(':my-web-business').projectDir
    def baseBizPath = project(':my-base-business').projectDir
    def comBizPath = project(':my-common').projectDir

    compile project(':my-app-business')
    compile project(':my-web-business')
    compile project(':my-base-business')
    compile project(':my-common')

    compileAspect {
        additionalAjcArgs = ['encoding': 'UTF-8', 'showWeaveInfo': true, 'srcdir' : "${appBizPath}/src/main;${webBizPath}/src/main;${baseBizPath}/src/main;${comBizPath}/src/main"]
    }
    ajInpath ("com.aa.bb:bb-core:1.0"){
        exclude(group: "org.springframework")
    }
}
 类似资料:
  • 是否有可能拥有一个Scala Maven项目,并在Scala类中编译时编织AspectJ方面? 我已经能够使加载时编织工作,但到目前为止没有成功的编译时。

  • 我目前正在尝试将基于Ant的构建过程转移到Gradle。 任务“:CompileJava”执行失败。编译失败;有关详细信息,请参阅编译器错误输出。“ -stacktrace选项不提供其他信息。所以,Gradle编译显示我的代码中有一些错误。但是这个相同的代码(Ant jar任务的jar)目前被20个或更多的其他项目使用,一切都是可以的。 Gradle似乎是一个很棒的构建工具,所以我想理解为什么当我

  • 我为我的fedmsg java项目添加了一个外部库。我有我的代码编译和工作的伟大。我需要从fedmsg类中获得一些额外的东西,所以我将他们的存储库分叉,并打开一个pull请求,开发就开始了。 但是,当我在IntelliJ和atlassian SDK中编译代码时,出现以下错误: 错误:(49,19)java:找不到符号符号:方法dislink()位置:org.fedoraproject.fedmsg

  • 问题内容: 仅使用编译时编织尝试为大量DTO编织默认的toString()方法。目标是使用Jackson库返回JSON表示形式。 遵循本文的建议,将其转换为注释样式的方面配置,并得到以下代码: 在结果类上运行表明它们实现了JsonToString接口,但是在任何地方都没有toString()方法的迹象。 如果我将方法名称更改为与Object.toString()不冲突的名称(例如toString2

  • 问题内容: 我有一个当前可与Java 6一起使用并编译时间编织的项目。我们使用以下pom启用spring方面以及我们自己的方面: 我尝试了各种配置,但是不能使其与Java 7一起使用。如果有人可以共享工作的pom或导致它,那将是很好的。 问题答案: 升级到Aspectjtools的1.7.0版后,它可以正常工作。另外,您需要将版本参数传递给编译器(使用该参数会导致问题)。如果有人需要更多详细信息,

  • 但我的问题是,如果它不使用AspectJ进行编织,那么Spring AOP是否有自己的编织,它是在加载时还是编译时执行? 我的Spring配置XML文件的相关部分是: