spring框架升到最新版本4.1.2 这时需要增加spring data jpa(版本是1.7.1)的支持。
遇到了一下问题:
Caused by: org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class org.jasig.cas.services.DefaultServicesManagerImpl]: Common causes of this problem include using a final class or a non-visible class; nested exception is java.lang.IllegalArgumentException: Cannot subclass final class class org.jasig.cas.services.DefaultServicesManagerImpl
at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:212)at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:109)
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:447)
网上也搜索了一堆帖子:
将<aop:aspectj-autoproxy proxy-target-class="true"/> 改为 <aop:aspectj-autoproxy/>
但是不起作用。
经过老大提升,先注释事务的配置,再调下,结果可以跑起来了,
<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/>
改为<tx:annotation-driven transaction-manager="transactionManager"/>
原来事务配置这里也改掉。