1. 程式人生 > >shiro 配置註解後無權訪問不進行頁面跳轉異常:org.apache.shiro.authz.UnauthorizedException: Subject does not have permission

shiro 配置註解後無權訪問不進行頁面跳轉異常:org.apache.shiro.authz.UnauthorizedException: Subject does not have permission

class bject ram body pac framework simple -- 管理

該問題需要使用異常管理:

<!-- 無權訪問跳轉的頁面 -->
<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
  <property name="exceptionMappings">
    <props>
      <prop key="org.apache.shiro.authz.UnauthorizedException">refuse</prop>
    </props>
  </property>
</bean>

shiro 配置註解後無權訪問不進行頁面跳轉異常:org.apache.shiro.authz.UnauthorizedException: Subject does not have permission