我想設置沒有任何XML的Spring AOP,並想知道如何以這種方式啓用自動代理。沒有XML的Spring AOP
定義一個AutoProxyCreator-bean的工作,但沒有一個更簡單的方法嗎?
這是我@Configuration是什麼樣子:
@Configuration
public class Context {
@Bean
public AnnotationAwareAspectJAutoProxyCreator annotationAwareAspectJAutoProxyCreator() {
return new AnnotationAwareAspectJAutoProxyCreator();
};
...
}
所有其他豆類由AnnotationConfigApplicationContext
掃描英寸
謝謝你,所以我想我的解決方案是確定暫且;) – CKuck