shiro的退出过滤器LogoutFilter自定义跳转url

shiro的退出过滤器LogoutFilter自定义跳转url

自定义一个filter,其实还是LogoutFilter


<bean id="logoutFilter" class="org.apache.shiro.web.filter.authc.LogoutFilter">
    <property name="redirectUrl" value="跳转的路径">property>
bean>

<property name="filters">
    <map>
        <entry key="logout" value-ref="logoutFilter" />
    map>
property>


<property name="filterChainDefinitions">
    <value>
        /logout=logout
    value>
property>

这样就可以了哟。

你可能感兴趣的:(后端)