且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 Spring Boot 中覆盖托管版本的依赖项

更新时间:2023-02-22 19:00:26

在你的 pom.xml 中应该这样做:

This in your pom.xml should do it:

<properties>
    <spring.version>4.1.5.RELEASE</spring.version>
</properties>

直接来自 文档.

在过度覆盖依赖版本之前,请注意以下建议(来自上面的链接):

Before you go overboard overriding versions of dependencies, heed this advise (from the link above):

每个 Spring Boot 版本都针对一组特定的第三方依赖项进行设计和测试.覆盖版本可能会导致兼容性问题.

Each Spring Boot release is designed and tested against a specific set of third-party dependencies. Overriding versions may cause compatibility issues.