5.3、在项目上右键,点击"Add Framework Support...",选中Maven
5.4、IDEA的Settings中设置Maven为自己配置的Maven(Maven设置可以参看:https://www.cnblogs.com/iflytek/p/8526182.html)
5.5、在pom.xml文件中编写如下内容
1 <?xml version="1.0" encoding="UTF-8"?> 2 <project xmlns="http://maven.apache.org/POM/4.0.0" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 "> 5 <modelVersion>4.0.0</modelVersion> 6 7 <groupId>cn.temptation</groupId> 8 <artifactId>studygit</artifactId> 9 <version>1.0-SNAPSHOT</version> 10 11 <!-- 使用spring boot的默认设置 --> 12 <parent> 13 <groupId>org.springframework.boot</groupId> 14 <artifactId>spring-boot-starter-parent</artifactId> 15 <version>2.0.4.RELEASE</version> 16 </parent> 17 18 <dependencies> 19 <!-- web --> 20 <dependency> 21 <groupId>org.springframework.boot</groupId> 22 <artifactId>spring-boot-starter-web</artifactId> 23 </dependency> 24 <!-- thymeleaf --> 25 <dependency> 26 <groupId>org.springframework.boot</groupId> 27 <artifactId>spring-boot-starter-thymeleaf</artifactId> 28 </dependency> 29 </dependencies> 30 </project>