org.springframework.beans.ConversionNotSupportedException异常解决方法
来源:互联网 发布:苹果手机变音软件 编辑:程序博客网 时间:2024/05/19 07:25
最近在SpringBoot项目中配置事务,结果一运行出现这个异常,当然这个异常不是由于事务引起的。
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
Spring beans.xml配置如下:
<bean id="readExcel" class="com.loongshawn.method.pms.ReadExcel"/> <bean id="rfqService" class="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" ref="rfqSourceFileValidService"/> </bean>
rfqFileUpload bean的传入参数rfqService,而这个bean是RfqService接口的实现类RfqServiceImpl,这个时候实现类转换失败。
解决方法如下:
- 1、添加aop依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId></dependency>
- 1、applicationContext.xml文件中配置aop,注明可以用实现类注入。
<aop:config proxy-target-class="true"></aop:config>
阅读全文
1 0
- org.springframework.beans.ConversionNotSupportedException异常解决方法
- java异常:org.springframework.beans.ConversionNotSupportedException
- org.springframework.beans.ConversionNotSupportedException:
- org.springframework.beans.ConversionNotSupportedException
- Spring+mybatis+SpringMVC整合发生异常:org.springframework.beans.ConversionNotSupportedException
- SSM 运行时发生异常:org.springframework.beans.ConversionNotSupportedException:
- nested exception is org.springframework.beans.ConversionNotSupportedException的解决方法
- spring异常解决方法:org.springframework.beans.factory.BeanCreationNotAllowedException
- org.springframework.beans.ConversionNotSupportedException: Failed to convert value of type 'java.la
- 异常处理 org.springframework.beans.factory.BeanCreationException
- 异常:org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
- 异常org.springframework.beans.factory.NoSuchBeanDefinitionException
- org.springframework.beans.factory.BeanCreationException异常
- org.springframework.beans.factory.NoSuchBeanDefinitionException: 异常处理
- org.springframework.beans.factory.UnsatisfiedDependencyException异常
- org.springframework.beans.factory.NoUniqueBeanDefinitionException异常问题
- org.springframework.beans.factory.UnsatisfiedDependencyException异常
- 异常:org.springframework.beans.factory.BeanNotOfRequiredTypeException
- python居家旅行必备的pyenv,virtualenv
- HDU 6150 Vertex Cover 构造
- python试爬李毅吧贴子标题,爬虫最初级
- python使用scrapy爬表格,爬虫中级
- skynet源码分析(1)--模块加载
- org.springframework.beans.ConversionNotSupportedException异常解决方法
- skynet源码分析(2)--消息队列mq
- skynet源码分析(3)--消息名字和ID之handle
- Unix和Linux有什么区别? 通俗解释
- skynet源码分析(4)--monitor
- skynet源码分析(5)--消息机制之消息处理
- skynet源码分析(6)--消息机制之消息分发
- skynet源码分析(7)--skynet中的timer
- Java-约瑟夫问题(Josephus Problem)