Error creating bean with name 'baseAction' defined in class path resource

来源:互联网 发布:teamviewer mac版12.0 编辑:程序博客网 时间:2024/04/28 03:02

如果spring中注入的属性与类中所有的属性不符会出现以下异常此时要检查所有的注入的属性个数

Error creating bean with name 'baseAction' defined in class path resource 

[applicationContext.xml]: Cannot resolve reference to bean 'userService' while setting bean property 'userService'; nested exception is org.springframework.beans.factory.BeanCreationException:
 Error creating bean with name 'userService' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'userLoginDao' while setting bean property 'userLoginDao'; nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'userLoginDao' defined in class path resource [applicationContext.xml]:
 Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'sessionFactory' of bean class [com.neusoft.oa.dao.impl.UserLoginDaoImpl]: Bean property 'sessionFactory' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

0 0