[英]Spring AOP issue with multi maven project
嗨,我在POM中使用帶有模塊的Multi Maven Spring項目
與單獨的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.