XMLなしでSpring AOPを設定しようとしています。 に@Configuration
と注釈を付けたクラスで<aop:aspectj-autoproxy>
を有効にしたいと思います。Javaベースのアノテーションで<aop:aspectj-autoproxy>を有効にする方法
これは、それがXMLファイルで定義されるような方法である:
<aop:aspectj-autoproxy>
<aop:include name="msgHandlingAspect" />
</aop:aspectj-autoproxy>
私は@Configuration
と@EnableAspectJAutoProxy
で私のクラスに注釈を付けることを試みたが、何も起こりませんでした。
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/annotation/EnableAspectJAutoProxy.html – firstpostcommenter