Spring Security4 HTTP Basic 认证
Spring Security4 HTTP Basic 认证<http auto-config="true" use-expressions="true">
<intercept-url pattern="/index" access="hasRole('ROLE_USER')" />
<!-- HTTP Basic 认证 -->
<http-basic />
<!-- 无权限页面 -->
<access-denied-handler error-page="/403" />
</http>
<authentication-manager>
<authentication-provider>
<user-service>
<user name="admin" password="123456" authorities="ROLE_USER" />
</user-service>
</authentication-provider>
</authentication-manager>
页:
[1]