Created
August 14, 2018 11:42
-
-
Save LunaticWolf/4afacb92b840555c17795779b1ad51e9 to your computer and use it in GitHub Desktop.
nishant's spring-security
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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.2.xsd | |
http://www.springframework.org/schema/security | |
http://www.springframework.org/schema/security/spring-security-3.2.xsd"> | |
<beans:import resource="spring-servlet.xml"/> | |
<http auto-config="true"> | |
<intercept-url pattern="/" access="IS_AUTHENTICATED_ANONYMOUSLY"/> | |
<intercept-url pattern="/logout" access="IS_AUTHENTICATED_ANONYMOUSLY"/> | |
<intercept-url pattern="/" access="ROLE_USER,ROLE_ADMIN"/> | |
<form-login login-page="/login" authentication-success-handler-ref="authorization" always-use-default-target="true" default-target-url="/login" /> | |
<logout logout-success-url="/logoutt"/> | |
</http> | |
<authentication-manager> | |
<authentication-provider> | |
<jdbc-user-service data-source-ref="dataSource1" | |
users-by-username-query= | |
"select UserName,Password,Enabled from Nishant180 where UserName=?" | |
authorities-by-username-query= | |
"select UserName,role from Nishant180 INNER join Nishant267 on nishant180.role_roleid=Nishant267.roleid where Nishant180.UserName = ?" | |
/> | |
<!-- <user-service> | |
<user name="abc" authorities="ROLE_USER" password="123"/> | |
</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