准备资料
POM文件中加入以下代码
1 <parent> 2 <groupId>org.springframework.boot</groupId> 3 <artifactId>spring-boot-starter-parent</artifactId> 4 <version>1.5.9.RELEASE</version> 5 <relativePath /> <!-- lookup parent from repository --> 6 </parent> 7 8 <properties> 9 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 10 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> 11 <java.version>1.8</java.version> 12 </properties> 13 14 <dependencies> 15 <dependency> 16 <groupId>org.springframework.boot</groupId> 17 <artifactId>spring-boot-starter-web</artifactId> 18 </dependency> 19 <dependency> 20 <groupId>org.springframework.boot</groupId> 21 <artifactId>spring-boot-starter-test</artifactId> 22 <scope>test</scope> 23 </dependency> 24 </dependencies>
Step 1: (2019/4/10 22:25:39) 用户在"Other... Ctrl+N (菜单项目)"上左键单击
Step 2: (2019/4/10 22:25:40) 用户在"&Next (按钮)"上左键单击(在"New"中)
Step 3: (2019/4/10 22:25:41) 用户在"&Next (按钮)"上左键单击(在"New"中)
Step 4: (2019/4/10 22:25:43) 用户在"&Next (按钮)"上左键单击(在"New"中)
Step 5: (2019/4/10 22:25:54) 用户在"Finish (按钮)"上左键单击(在"New"中)
原文:https://www.cnblogs.com/yuhuiqing/p/10686613.html