I want to do the function of forgetting my password, but it is always blocked by shiro, and all requests that do not log in jump back to the login page
ajax
function getYZM() {
$.ajax({
url:"user/forgetPwdYz.do",
type:"POST",
async: false,
success: function(data){
alert("");
alert(data);
},
error:function(data){
alert("");
}
})
}
shiro
<!-- 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>
//user
/user/*.do = anon
/userYz.jsp/** = anon
/** = authc
</value>
</property>
</bean>