shiro+ssm项目无法访问jsp,目前怀疑shiro配置有问题导致无法注入,但不知道从何下手,大神求解
Error creating bean with name 'shiroFilter' defined in file [D:\Program Files\tomcat8\apache-tomcat-8.0.37\webapps\cloudparking\WEB-INF\classes\applicationContext-shiro.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager';
Error creating bean with name 'securityManager' defined in file [D:\Program Files\tomcat8\apache-tomcat-8.0.37\webapps\cloudparking\WEB-INF\classes\applicationContext-shiro.xml]: Cannot resolve reference to bean 'shiroDbRealm' while setting bean property 'realm';
Error creating bean with name 'shiroDbRealm': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.dnake.cloudparking.service.UserService com.dnake.cloudparking.auth.AuthRealm.userService;
上述为与shiro有关的报错信息以及shiro.xml中我认为有用的内容
Error creating bean with name 'userService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.dnake.cloudparking.dao.UserDao com.dnake.cloudparking.service.impl.UserServiceImpl.userDao;
这段报错信息应该是自动注入报错的地方
我的UserSercieImpl是以@Service注解的
在UserDao 类上加上@Repository注解没有用。。
我的UserDao是接口
求大神解答,实在搞不定
<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
<property name="realm" ref="shiroDbRealm" />
<property name="cacheManager" ref="shiroEhcacheManager" />
</bean>
<!-- 項目自定义的Realm, 所有accountService依赖的dao都需要用depends-on声明 -->
<bean id="shiroDbRealm" class="com.dnake.cloudparking.auth.AuthRealm" depends-on="userDao,userWechatDao,parkingTicketDao,userParkingTicketDao,jdbcQueryDao">
<property name="userService" ref="userService" />
</bean>
<!--
<bean id="sessionFilter"
class="com.dnake.cloudparking.auth.SessionFilter"> </bean>
-->
<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
<property name="securityManager" ref="securityManager" />
<property name="loginUrl" value="/login" />
<property name="successUrl" value="/index" />
<!--
<property name="filters"> <map> <entry key="sessionFilter"
value-ref="sessionFilter"/> </map> </property>
-->
<property name="filterChainDefinitions">
<value>
/ = anon
/login.jsp= anon
/index.jsp = anon
/login = anon
/syslogin = anon
/loginval = anon
/syslogout = anon
/servlet/AuthImageServlet = anon
/getBackPwdStep* = anon
/backuncheck/** = anon
/weixin/** = anon
/alipay/** = anon
/static/**= anon
/res/** = anon
/api/** = anon
/createScanQrCodeOrder = anon
/weixin/payNotify = anon
/alipay/payNotify = anon
/wxpay_refund_notify = anon
/register/** = anon
/app/* = anon
/parking.jsp = anon
/video.html = anon
/saveParking = anon
/admin/** =roles[admin]
/** = user
</value>
</property>Error creating bean with name 'securityManager' defined in file [D:\Program Files\tomcat8\apache-tomcat-8.0.37\webapps\cloudparking\WEB-INF\classes\applicationContext-shiro.xml]: Cannot resolve reference to bean 'shiroDbRealm' while setting bean property 'realm';
Error creating bean with name 'shiroDbRealm': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.dnake.cloudparking.service.UserService com.dnake.cloudparking.auth.AuthRealm.userService;
上述为与shiro有关的报错信息以及shiro.xml中我认为有用的内容
Error creating bean with name 'userService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.dnake.cloudparking.dao.UserDao com.dnake.cloudparking.service.impl.UserServiceImpl.userDao;
这段报错信息应该是自动注入报错的地方
我的UserSercieImpl是以@Service注解的
在UserDao 类上加上@Repository注解没有用。。
我的UserDao是接口
求大神解答,实在搞不定

...全文
相关推荐
SSM整合shiro的简单框架搭建,JSP项目
SSM框架整合shiro安全框架,适合新手下载看看是怎么具体搭建的,了解下里面的逻辑。
shiro+SSM实现安全登录的项目
Shiro+SSM框架实现安全登录的demo,本项目为自己编写运行,导入eclipse可用。
Maven+SSM+Shiro-javaweb项目下载
Maven+SSM+Shiro安全框架 集成的一个项目,大家可以下载后研究一下,增加知识!
SSM+shiro+redis
spring+springmvc+mybatis+shiro+redis集成项目,rdis作为并发缓存工具,shiro权限管理,实现单点登录,同一个用户会别踢下线
ssm+shiro实现权限框架
基于shior+ssm+maven开的权限开发,根据角色,实现不同的用户拥有不同的权限,sql文件在项目内,导入eclispe或idea中就可以运行


