这是本人的shiroFilter配置:
<bean id=”securityManager” class=”org.apache.shiro.web.mgt.DefaultWebSecurityManager”>
<property name=”realm” ref=”ShiroRealm” />
</bean>
<!– 項目自定义的Realm –>
<bean id=”ShiroRealm” class=”com.fh.interceptor.shiro.ShiroRealm” ></bean>
<!– Shiro Filter –>
<bean id=”shiroFilter” class=”org.apache.shiro.spring.web.ShiroFilterFactoryBean”>
<property name=”securityManager” ref=”securityManager” />
<property name=”loginUrl” value=”/” />
<property name=”successUrl” value=”/main/index” />
<property name=”unauthorizedUrl” value=”/login_toLogin” />
<property name=”filterChainDefinitions”>
<value>
/static/login/** = anon
/static/js/myjs/** = authc
/static/js/** = anon
/uploadFiles/uploadImgs/** = anon
/code.do = anon
/login_login = anon
/app**/** = anon
/weixin/** = anon
/** = authc
</value>
</property>
</bean>
这是jsp页面代码:就在元素里面跳转,一直报404,是怎么回事。
<li style=”margin-right: 30px;padding-left: 20px;”>
<a href=”person-set.jsp” class=”icons24 icons24-refresh”>
<span> 账号设置</span>
<bean id=”securityManager” class=”org.apache.shiro.web.mgt.DefaultWebSecurityManager”>
<property name=”realm” ref=”ShiroRealm” />
</bean>
<!– 項目自定义的Realm –>
<bean id=”ShiroRealm” class=”com.fh.interceptor.shiro.ShiroRealm” ></bean>
<!– Shiro Filter –>
<bean id=”shiroFilter” class=”org.apache.shiro.spring.web.ShiroFilterFactoryBean”>
<property name=”securityManager” ref=”securityManager” />
<property name=”loginUrl” value=”/” />
<property name=”successUrl” value=”/main/index” />
<property name=”unauthorizedUrl” value=”/login_toLogin” />
<property name=”filterChainDefinitions”>
<value>
/static/login/** = anon
/static/js/myjs/** = authc
/static/js/** = anon
/uploadFiles/uploadImgs/** = anon
/code.do = anon
/login_login = anon
/app**/** = anon
/weixin/** = anon
/** = authc
</value>
</property>
</bean>
这是jsp页面代码:就在元素里面跳转,一直报404,是怎么回事。
<li style=”margin-right: 30px;padding-left: 20px;”>
<a href=”person-set.jsp” class=”icons24 icons24-refresh”>
<span> 账号设置</span>
解决方案
80
看下控制台吧 报错页面也截一下图