gpt4 book ai didi

spring - Maven : Spring 4 + Spring Security

转载 作者:IT老高 更新时间:2023-10-28 13:47:30 27 4
gpt4 key购买 nike

您能向我解释一下如何使用 Spring 正确构建 Web 应用程序吗?我知道 Spring 框架的最新版本是 4.0.0.RELEASE,但是 Spring Security 的最新版本是 3.2.0.RELEASE,而且它依赖于 spring 3.2.6 ......也许我错了:)

如何将它与 Maven 集成? 我可以使用 Spring 4 还是必须使用以前的版本? 正确的方法是什么?

如果对你来说不难,你能给我看看你的 pom.xml 吗?

最佳答案

使用 Spring 4 应该没问题。如 documentation 中所述。 :

"Spring Security 针对 Spring Framework 3.2.6.RELEASE 构建,但也针对 Spring Framework 4.0.0.RELEASE 进行了测试。这意味着您可以将 Spring Security 3.2.0.RELEASE 与 Spring Framework 4.0.0 一起使用.RELEASE.

他们继续描述了在您的项目中集成 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>

关于spring - Maven : Spring 4 + Spring Security,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20821155/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com