嗨,我正在使用一个带有POM模块的多maven spring项目。
与单独的pom.xml
我在LoggerAspect模块中创建了一个包含
@Pointcut("execution(* *.*(..))")问题是,当我正在构建project(Bhoomi-presentation-0.1.0.BUILD-SNAPSHOT.war)时,它只是记录Bhoomi表示模块中存在的类文件的日志,而不是其他模块。
所有其他模块都以jar的形式出现在解放战争中。
如果我忘记了任何配置,请告诉我,这样我就可以记录所有的项目日志了。
发布于 2014-08-05 15:12:52
I can think of something like this in XML( surely it can be done with annotations as well ) for creating common pointcuts spanning multiple modules
<aop:config>
<aop:pointcut id="appPointcutServices" expression="bean(*Services)" />
<aop:pointcut id="appPointcutDao" expression="bean(*Dao)" />
<aop:pointcut id="appPointcutRepository" expression="bean(*Repository)" />
<aop:config>
& Then attach these pointcuts with your application defined Advisorhttps://stackoverflow.com/questions/24604126
复制相似问题