spring security5.0 如何才能让 /与 /index.html 不冲突,让所有路径需要权限,但是只开放 index.html,明明在 XML 中配置了<security:http pattern="/index.html" security="none"/>'但是在<security:http use-expression="false" entry-point-ref="ajaxAuthenticationPoint" auto-config="false"><security:intercept-url pattern="/" access="ROLE_USER"/>security:http/配置所有路径权限,导致 index 也无法访问了
1
hantsy 2019-11-14 11:12:55 +08:00
好多年没见过 XML 配置了。
按以下顺序设置试一下: 1. pattern="/**" access="ROLE_USER" 2. pattern="/index.html access 设置成匿名 |