如何从 Spring Boot 项目中获取当前的 thymeleaf 版本? [英] How to get the current thymeleaf version from spring boot project?

查看:80
本文介绍了如何从 Spring Boot 项目中获取当前的 thymeleaf 版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Spring Boot 2.1.0.RELEASE 项目.如何查看它使用的百里香版本?

I have a Spring Boot 2.1.0.RELEASE project. How can I see the thymeleaf version it uses?

推荐答案

如果你使用的是 maven,你可以使用 list maven 依赖插件:

If you're using maven, you can use list goal of maven dependecy plugin:

$ mvn dependency:list -DincludeArtifactIds=thymeleaf

或者使用 maven 包装器:

Or with maven wrapper:

$ ./mvnw dependency:list -DincludeArtifactIds=thymeleaf

maven 输出示例:

Example output for maven:

[INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ site ---
[INFO] 
[INFO] The following files have been resolved:
[INFO]    org.thymeleaf:thymeleaf:jar:3.0.9.RELEASE:compile

对于Gradle:

$ gradle dependencyInsight --dependency org.thymeleaf:thymeleaf

带包装:

$ ./gradlew dependencyInsight --dependency org.thymeleaf:thymeleaf

Gradle 的输出示例:

Example output for Gradle:

org.thymeleaf:thymeleaf:2.1.6.RELEASE (selected by rule)
\--- org.thymeleaf:thymeleaf-spring4:2.1.6.RELEASE
     \--- org.springframework.boot:spring-boot-starter-thymeleaf:1.5.9.RELEASE
          \--- compile

org.thymeleaf:thymeleaf:2.1.4.RELEASE -> 2.1.6.RELEASE
\--- nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:1.4.0
     \--- org.springframework.boot:spring-boot-starter-thymeleaf:1.5.9.RELEASE
          \--- compile

org.thymeleaf:thymeleaf-spring4:2.1.6.RELEASE (selected by rule)
\--- org.springframework.boot:spring-boot-starter-thymeleaf:1.5.9.RELEASE
     \--- compile

另见检查依赖项

这篇关于如何从 Spring Boot 项目中获取当前的 thymeleaf 版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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