Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven : Spring 4 + Spring Security

Tags:

Can you explain to me how to properly build a web app with Spring? I know that the latest version of Spring framework is 4.0.0.RELEASE, but the latest version of Spring Security is 3.2.0.RELEASE, and it depends on spring 3.2.6... maybe i'm wrong :)

How can I integrate it with Maven? Can I use Spring 4 or must I use the previous version? What is the proper way?

If it`s not hard for you could you show me you pom.xml?

like image 332
aleh Avatar asked Dec 29 '13 01:12

aleh


People also ask

How do I add Spring Security to POM XML?

For adding a Spring Boot Security to your Spring Boot application, we need to add the Spring Boot Starter Security dependency in our build configuration file. Maven users can add the following dependency in the pom. xml file. Gradle users can add the following dependency in the build.

What is org Springframework security?

org.springframework.security » spring-security-coreApache. Spring Security is a powerful and highly customizable authentication and access-control framework. It provides protection against attacks like session fixation, clickjacking, cross site request forgery, etc. Last Release on Aug 15, 2022.


1 Answers

You should be fine using Spring 4. As described in the documentation:

"Spring Security builds against Spring Framework 3.2.6.RELEASE, but is also tested against Spring Framework 4.0.0.RELEASE. This means you can use Spring Security 3.2.0.RELEASE with Spring Framework 4.0.0.RELEASE."

They go on to describe strategies for integrating Spring 4 with Spring Security in your project. Like this one:

<dependencyManagement>     <dependencies>       <dependency>         <groupId>org.springframework</groupId>         <artifactId>spring-framework-bom</artifactId>         <version>4.0.0.RELEASE</version>         <type>pom</type>         <scope>import</scope>       </dependency>     </dependencies> </dependencyManagement> 
like image 172
Vidya Avatar answered Oct 14 '22 16:10

Vidya