我用SSH进行开发,使用SPRING代理STRUTS,我想进行HIBERNATE的事务管理,如果我显性进行事务管理,可以成功,但是在SPRING中配置事务就会出现异常,说无法创建bean。就是说我把事务管理的这段代码删除掉就异常了
我的SPRING配置如下
PROPAGATION_REQUIRED
myservice
interceptor2
异常如下:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/insert' defined in ServletContext resource [/WEB-INF/applicationContext.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 [$Proxy3] to required type [dao.MyServiceImp] for property 'myservice'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy3] to required type [dao.MyServiceImp] for property 'myservice': 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 [$Proxy3] to required type [dao.MyServiceImp] for property 'myservice'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy3] to required type [dao.MyServiceImp] for property 'myservice': no matching editors or conversion strategy found
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy3] to required type [dao.MyServiceImp] for property 'myservice': no matching editors or conversion strategy found
我的理解是无法进行类型转化导致无法创建/insert找个bean,但是我没有进行类型转换啊,而且我不加事务处理的时候运行都很正常