繁体   English   中英

多Maven项目的Spring AOP问题

[英]Spring AOP issue with multi maven project

嗨,我在POM中使用带有模块的Multi Maven Spring项目

  1. Bhoomi-domain-it
  2. Bhoomi-data-it
  3. 博米域
  4. 布米数据
  5. 布米演示
  6. Bhoomi整合消费者
  7. Bhoomi集成提供者

与单独的pom.xml

我在包含以下内容的Bhoomi-presentation模块中创建了LoggerAspect类

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

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

所有其他模块在WAR库中以jar形式存在

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM