Skip to content

Instantly share code, notes, and snippets.

@pikanji
Created January 19, 2013 10:13
Show Gist options
  • Save pikanji/4571776 to your computer and use it in GitHub Desktop.
Save pikanji/4571776 to your computer and use it in GitHub Desktop.
Minimum sample of spring-security.xml
<?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-3.1.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<http auto-config="true">
<intercept-url pattern="/**" access="ROLE_USER" />
</http>
<authentication-manager>
<authentication-provider>
<user-service>
<user name="hoge" password="fuga" authorities="ROLE_USER" />
</user-service>
</authentication-provider>
</authentication-manager>
</beans:beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment