java异常:org.springframework.beans.ConversionNotSupportedException
2017-04-30 01:26
567 查看
org.springframework.beans.ConversionNotSupportedException
原因:Spring注入的是接口,关联的是实现类,使用的是jdk自带的代理方法。
所以如果你在类中声明的属性(例如自己写的带有接口的类)的数据类型是实体类,就会报这种错误
解决:使用cglib代理的方法,在spring配置文件中加入<aop:config proxy-target-class=“true”></aop:config>后就可以在类中声明的属性(例如自己写的带有接口的类对象)的数据类型是实体类
不然就将类中声明的属性(例如自己写的带有接口的类对象)的数据类型改为其接口
原因:Spring注入的是接口,关联的是实现类,使用的是jdk自带的代理方法。
所以如果你在类中声明的属性(例如自己写的带有接口的类)的数据类型是实体类,就会报这种错误
解决:使用cglib代理的方法,在spring配置文件中加入<aop:config proxy-target-class=“true”></aop:config>后就可以在类中声明的属性(例如自己写的带有接口的类对象)的数据类型是实体类
不然就将类中声明的属性(例如自己写的带有接口的类对象)的数据类型改为其接口
相关文章推荐
- Spring 整合 Flex (BlazeDS)无法从as对象 到 Java对象转换的异常:org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.Date' to required type 'java.sql.Timestamp' for property 'wfsj'; nested exception is java.lang.Ill
- Spring+mybatis+SpringMVC整合发生异常:org.springframework.beans.ConversionNotSupportedException
- Spring 整合 Flex (BlazeDS)无法从as对象 到 Java对象转换的异常:org.springframework.beans.ConversionNotSupportedExcept
- SSM 运行时发生异常:org.springframework.beans.ConversionNotSupportedException:
- org.springframework.beans.ConversionNotSupportedException: Failed to convert value of type 'java.la
- org.springframework.beans.ConversionNotSupportedException异常解决方法
- org.springframework.beans.ConversionNotSupportedException:
- nested exception is org.springframework.beans.ConversionNotSupportedException的解决方法
- org.springframework.beans.ConversionNotSupportedException
- Tomcat 启动报java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 异常
- springmvc在 IDEA 异常:java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServl
- spring异常 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderServlet
- 在Spring Cloud框架整合微服务时出现的org.springframework.web.HttpMediaTypeNotSupportedException异常问题
- Spring抛出异常:java.lang.ClassNotFoundException: org.springframework.expression.PropertyAccessor
- Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.NoUniqueBeanDefinitio
- [无异常,才正常]java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
- 异常:java.lang.ClassNotFoundException: org.springframework.web.servlet.Dispatcher
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderServlet服务器启动报异常
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderServlet服务器启动报异常
- 在eclipse中运行spring web application时的异常: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener