Recently, the transaction was configured in the Springboot project, resulting in a run of this exception, which is not caused by a transaction.
Org.springframework.beans.ConversionNotSupportedException:Failed to convert property value of type ' com.sun.proxy.$ Proxy54 implementing Com.loongshawn.service.rfqservice,org.springframework.aop.springproxy, Org.springframework.aop.framework.Advised
The Spring Beans.xml is configured as follows:
<bean id= "Readexcel" class= "Com.loongshawn.method.pms.ReadExcel"/> <bean id= "Rfqservice"
Com.loongshawn.service.impl.RfqServiceImpl "/>
<bean id=" Rfqsourcefilevalidservice "class=" Com.loongshawn.service.impl.RfqSourceFileValidServiceImpl "/>
<bean id=" Rfqfileupload "class=" Com.loongshawn.method.pms.RfqFileUpload ">
<property name=" Readexcel "ref=" Readexcel "/>
< Property Name= "Rfqservice" ref= "Rfqservice"/> <property name= "Rfqsourcefilevalidservice"
Rfqsourcefilevalidservice "/>
</bean>
Rfqfileupload the incoming parameter of the Bean Rfqservice, which is the implementation class Rfqserviceimpl of the Rfqservice interface, at which point the implementation class conversion failed.
The workaround is as follows: 1. Adding AOP Dependencies
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId> Spring-boot-starter-aop</artifactid>
</dependency>
1, the Applicationcontext.xml file configuration AOP, annotated can be injected with implementation class.
<aop:config proxy-target-class= "true" ></aop:config>