方式一:通过代码查看

1
2
3
4
5
6
7
8
public static void main(String[] args) {
System.out.println(SpringBootVersion.getVersion());
System.out.println(SpringVersion.getVersion());
}

// 返回
// 2.1.10.RELEASE
// 5.1.11.RELEASE

方式二:在 pom.xml 中查看

1
2
3
4
5
6
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.3.RELEASE</version>
<relativePath/>
</parent>

原文链接:
https://www.cnblogs.com/shisanye/p/13518865.html