INSERT INTO `Employees` (`username`, `password`, `enabled`) `enabled` tinyint(1) NOT NULL DEFAULT '1', `password` varchar(20) NOT NULL DEFAULT '', `username` varchar(20) NOT NULL DEFAULT '', We will look into three spring security authentication methods.įor JDBC, I am using MySQL database and have following script executed to create the user details tables.
Once we will have our application secured, final project structure will look like below image.
If you are unfamiliar with these steps, please refer Java Web Application Tutorial. Make sure to convert it to maven project because we are using Maven for build and deployment. We will create a web application and integrate it with Spring Security.Ĭreate a web application using “ Dynamic Web Project” option in Eclipse, so that our skeleton web application is ready.
We don’t need to modify web application configurations, spring automatically injects security filters to the web application. Easy to integrate in any web application.Prevents some of the common attacks such as CSRF, session fixation attacks.Security is something where we need to take extra care, otherwise our application will be vulnerable for attackers. Proven technology, it’s better to use this than reinvent the wheel.