spring Data JPA dao层自定义命名规范错误造成

org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'shiroFilter' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'securityManager'
while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'securityManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'myRealm' while setting
bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myRealm': Injection of autowired
dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private cn.itcast.bos.dao.UserDao
cn.itcast.bos.web.shiro.MyRealm.userDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao':
Invocation of init method failed;
nested exception is org.springframework.data.mapping.PropertyReferenceException: No property userName found for type User! Did you mean 'username'?

 

userName没有按照实体类中的属性username而导致此次报错

 

posted @ 2017-09-12 20:18  缺氧的鱼520  阅读(1187)  评论(0编辑  收藏  举报