您的位置:首页 > 编程语言 > Java开发

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

2015-11-27 21:21 525 查看
如果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?
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  spring 异常 bean