2

嗨,我正在使用 POM 中带有模块的多 maven spring 项目

  1. Bhoomi 域-it
  2. Bhoomi-数据-它
  3. 布米域
  4. 布米数据
  5. Bhoomi 演示文稿
  6. Bhoomi-整合-消费者
  7. Bhoomi-集成提供商

与个人pom.xml

我在包含的Bhoomi-presentation模块中 创建了一个 LoggerAspect 类

@Pointcut("execution(* *.*(..))")

问题是当我正在构建项目(Bhoomi-presentation-0.1.0.BUILD-SNAPSHOT.war)时,它只记录 Bhoomi-presentation 模块中存在的类文件的日志,而不是其他模块的日志

所有其他模块在 WAR 的 lib 中以 jar 的形式出现

如果我忘记了任何配置,请告诉我,以便我可以记录所有项目日志

4

1 回答 1

0
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 Advisor
于 2014-08-05T15:12:52.760 回答