Skip to content

Instantly share code, notes, and snippets.

@nasminspy
Created June 8, 2016 10:58
Show Gist options
  • Save nasminspy/eb1c2b1768246e4a5867c9d4e4d3b8c1 to your computer and use it in GitHub Desktop.
Save nasminspy/eb1c2b1768246e4a5867c9d4e4d3b8c1 to your computer and use it in GitHub Desktop.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:security="http://www.springframework.org/schema/security" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd">
<security:authentication-manager>
<security:authentication-provider>
<security:user-service id="userService">
<security:user name="username1" password="password1" authorities="ROLE_USER" /></security:user-service>
</security:authentication-provider>
</security:authentication-manager>
<security:http create-session="stateless" use-expressions="true">
<security:intercept-url pattern="/test/**" access="hasAnyRole('ROLE_USER')" />
<security:http-basic />
</security:http>
</beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment