我正在使用带有检票口的 spring-security-3.1
我想拒绝所有请求并将它们重定向到登录 /resources/* 的一部分,其中有照片和我的 ajax 加载器我今天正在做的是:
<security:http create-session="always" use-expressions="true">
<security:intercept-url pattern="/admin"
access="hasRole('ROLE_ADMIN')" />
<security:intercept-url pattern="/login"
access="permitAll()" />
<security:intercept-url pattern="/"
access="hasRole('ROLE_USER')" />
<security:form-login login-page="/login" />
<security:anonymous enabled="true" />
<security:logout logout-url="/logout" />
</security:http>
我在客户端收到此错误:
GET http://localhost:8080/myServer/resources/images/ajax-loader.gif 404 (Not Found)