如何覆盖 Spring Boot 依赖项的默认版本? [英] How to override Spring Boot dependencies default version?

查看:76
本文介绍了如何覆盖 Spring Boot 依赖项的默认版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改 Spring Boot 依赖项的默认版本?例如 Spring Boot 1.4 使用 Thymeleaf 2.1 版本,但 Thymeleaf 的最新版本是 3.0.那么如何将2.1版本改为3.0呢?

How to change Spring Boot dependencies default versions? For example Spring Boot 1.4 uses Thymeleaf 2.1 version but recent version of Thymeleaf is 3.0. So how to change version 2.1 to 3.0?

推荐答案

文档 描述了如何做到这一点.

根据问题上的标签判断,您使用的是 Maven.您应该在应用程序的 pom.xml 中添加一个属性来设置 Thymeleaf 版本:

Judging by the tags on the question, you're using Maven. You should add a property to your application's pom.xml to set the Thymeleaf version:

<properties>
    <thymeleaf.version>3.0.1.RELEASE</thymeleaf.version>
</properties>

还有一个 示例应用程序 展示了如何将 Thymeleaf 3.0 与可能感兴趣的 Spring Boot 1.4 结合使用.

There's also a sample application that shows how to use Thymeleaf 3.0 with Spring Boot 1.4 that may be of interest.

这篇关于如何覆盖 Spring Boot 依赖项的默认版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆