方法一:通过代码进行查看

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.SpringBootVersion;
import org.springframework.core.SpringVersion;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
public class SpringVersionTest {
    
    @Test
    public void getSpringVersion() {
        String version = SpringVersion.getVersion();
        String version1 = SpringBootVersion.getVersion();
        System.out.println(version);
        System.out.println(version1);
    }
}

  springboot项目中如何查看springBoot版本和Spring的版本

 

 

方法二,在pom.xml里进行查看

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.3.RELEASE</version>
    <relativePath/>
</parent>

  

 

相关文章:

  • 2022-12-23
  • 2021-12-31
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
猜你喜欢
  • 2022-12-23
  • 2021-09-22
  • 2021-05-26
  • 2021-06-02
  • 2022-12-23
  • 2021-07-07
  • 2021-06-27
相关资源
相似解决方案