Maven:Spring 4 + Spring安全性 [英] Maven : Spring 4 + Spring Security
问题描述
您能告诉我如何使用Spring正确构建Web应用程序吗?我知道Spring框架的最新版本是4.0.0.RELEASE,但是Spring Security的最新版本是3.2.0.RELEASE,它取决于spring 3.2.6 ...也许我错了:)>
如何将其与Maven集成? 我可以使用Spring 4还是必须使用以前的版本? 正确的方法是什么?
如果您不觉得困难,可以给我看一下pom.xml吗?
他们继续描述了将Spring 4与Spring Security集成到您的项目中的策略.像这样一个:
<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>
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?
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>
这篇关于Maven:Spring 4 + Spring安全性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!