一、springboot项目环境约束
我的工具版本:
-
jdk: jdk 1.8
-
maven : Apache Maven 3.6.0
-
IDEA: IntelliJ IDEA 2019.1 x64
-
Spring Boot: Spring Boot 2.2.1
1.maven 设置;
给maven的settings.xml配置文件的Profiles标签添加以下代码,目的是告诉maven我用的是jdk1.8版本。
<profiles>
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
</profiles>
2.