Maven环境下整合shiro一直报异常、请各位大佬指点一下!

HelloVersion 2017-12-06 04:57:06
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in file [F:\workspaces\driverSchool\target\classes\applicationContext-shiro.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 file [F:\workspaces\driverSchool\target\classes\applicationContext-shiro.xml]: Cannot resolve reference to bean 'shiroRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroRealm': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.xinbao.demo.service.IEmployeeService com.xinbao.demo.shiro.realms.ShrioRealm.employeeService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.xinbao.demo.mapper.BaseMapper com.xinbao.demo.service.impl.BaseServiceImpl.mapper; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.xinbao.demo.mapper.BaseMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}


同样的代码,我在web环境下就可以,但是用到Maven环境就不得行!以上是报错内容









...全文
277 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

24,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧