Spring Security with Custom Login Form

Posted on Posted in Spring Articles
Directory hierarchy

 

 

 

 

 

 

 

 

 

 

 

 

Application Controller

AppController.java

Security Configuration class

SecurityConfig.java

The equivalent of Spring Security configuration in  configuration xml file

 

Spring MVC Configuration

SpringMVCConfig.xml

Spring Security Initializer

SpringSecurityInitializer.java

The equivalent of Spring Security configuration in web.xml file :

 

admin.jsp

index.jsp

login.jsp

 

user.jsp

 

Output

URL : domain/

 

 

 

 

 

 

 

 

URL : domain/admin (If username or password is incorrect)

 

URL : domain/admin

 

 

Download project

Download required JARS

Enroll into our Spring course.