|
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userserviceImpl' defined in ServletContext resource [/WEB-INF/classes/memberContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy1] to required type [com.killer.daoimpl.userimpl.UserDAOImpl] for property 'usersdaoimpl'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [com.killer.daoimpl.userimpl.UserDAOImpl] for property 'usersdaoimpl': no matching editors or conversion strategy found
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:
PropertyAccessException 1:
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy1] to required type [com.killer.daoimpl.userimpl.UserDAOImpl] for property 'usersdaoimpl'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [com.killer.daoimpl.userimpl.UserDAOImpl] for property 'usersdaoimpl': no matching editors or conversion strategy found
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [com.killer.daoimpl.userimpl.UserDAOImpl] for property 'usersdaoimpl': no matching editors or conversion strategy found
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231)
这个异常说的是错误的创建Bean对象,因为属性值设置错误,归根到底是由于代理对象不能替换,因为默认的情况下使用的是spring使用的是JDK的代理,这是需要使用spring的代理,需要加入
<property name="proxyTargetClass" value="true" /> 就可以了。 |
|