簡體   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