Skip to content

Commit

Permalink
feat: Add context-security.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
todyDev committed Oct 23, 2018
1 parent 8cecde1 commit d3d34b8
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions securityPrj/src/main/resources/spring/context-security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-4.1.xsd">

<http auto-config="true" use-expressions="false">
<intercept-url pattern="/**" access="ROLE_USER" />
</http>

<authentication-manager>
<authentication-provider>
<user-service>
<user name="user" password="userPw" authorities="ROLE_USER"/>
<user name="guest" password="guest" authorities="ROLE_GUEST"/>
</user-service>
</authentication-provider>
</authentication-manager>

</beans:beans>

0 comments on commit d3d34b8

Please sign in to comment.