1. Window > Preferences > Java > Installed JREs > Add > Standard VM > Next > Directory > 选择jdk的安装路径 > Apply >
2. Java Compiler
3.<properties>
<java.version>1.8</java.version>
</properties>
<build>
<plugins>
<!-- Package as an executable jar -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.5</version>
<executions>
<execution>
<id>Generate MyBatis Artifacts</id>
<goals>
<goal>generate</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
<configuration>
<configurationFile>src/main/resources/config/mybatis-config.xml</configurationFile>
</configuration>
</plugin>
</plugins>
<finalName>PIT</finalName>
</build>
4.最后别忘了 右键项目 > Maven > Update Project 更新一下项目
https://blog.csdn.net/wyfh16/article/details/53759972