spring生成service
785 ワード
springがserviceに注入された時、エラーがありました.but was actually of type[comp.sun.proxy.$Proxy 21]です.
serviceはインターフェースを書いていないからです.
JDKエージェントとCGLOIBエージェントの違いです.先に記録しておきます
参考: http://jinnianshilongnian.iteye.com/blog/1508018
serviceはインターフェースを書いていないからです.
JDKエージェントとCGLOIBエージェントの違いです.先に記録しておきます
, , ,spring AOP JDK , , , , AOP service ,service Dao (spring ) , ...
CGLIB
CGLIB ,( , )
, final ...
applicationContext.xml
<aop:aspectj-autoproxy proxy-target-class="true"/>
cglib.jar
参考: http://jinnianshilongnian.iteye.com/blog/1508018