On the Verification of shiro

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>

Mar.29,2021

I tried. There is no problem with your configuration on my side. The corresponding url can be requested. If the post is directly requested using postman, you can request the corresponding result. I think you are trying to find the problem elsewhere. There is no configuration problem with shiro.


$.ajax({ url:'/user/forgetPwdYz.do' })
Menu