Mapping an exception to 404 page while using Spring Security taglibs

后端 未结 2 1274
情深已故
情深已故 2021-02-15 01:42

When mapping an Exception to 404 page, the Spring Security tags can\'t find the authentication information from the security context. With a \"real\" 404 the authentication is f

2条回答
  •  长情又很酷
    2021-02-15 02:12

    Add the following two dispatcher elements to your spring security filter-mapping:

    
        ...
        REQUEST
        ERROR
    
    

    By default only ordinary requests go through a defined filter-mapping.

    "INCLUDE" and "FORWARD" are the two other valid dispatcher element values.

提交回复
热议问题