初玩 spring boot,记录创建过程

 

 

1.File -- New -- Project

 

 IntelliJ IDEA创建Spring Boot

 

 

2. 选择 Spring Initializr,点击 Next

 

IntelliJ IDEA创建Spring Boot

 

 

3.等待加载完成,图中圈的地方可以自定义修改,点Next

 

IntelliJ IDEA创建Spring Boot

 

 

 

4. 选择Web  -- Spring Web ,点击 Next

IntelliJ IDEA创建Spring Boot

 

 

 

5.项目名和工程路径,点击 Finish

IntelliJ IDEA创建Spring Boot

 

 

 

6.等待加载完,目录如下:

 

IntelliJ IDEA创建Spring Boot

 

pom文件:

IntelliJ IDEA创建Spring Boot
 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 3          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
 4     <modelVersion>4.0.0</modelVersion>
 5     <parent>
 6         <groupId>org.springframework.boot</groupId>
 7         <artifactId>spring-boot-starter-parent</artifactId>
 8         <version>2.3.0.RELEASE</version>
 9         <relativePath/> <!-- lookup parent from repository -->
10     </parent>
11     <groupId>com.example</groupId>
12     <artifactId>demo</artifactId>
13     <version>0.0.1-SNAPSHOT</version>
14     <name>demo</name>
15     <description>Demo project for Spring Boot</description>
16 
17     <properties>
18         <java.version>1.8</java.version>
19     </properties>
20 
21     <dependencies>
22         <dependency>
23             <groupId>org.springframework.boot</groupId>
24             <artifactId>spring-boot-starter-web</artifactId>
25         </dependency>
26 
27         <dependency>
28             <groupId>org.springframework.boot</groupId>
29             <artifactId>spring-boot-starter-test</artifactId>
30             <scope>test</scope>
31             <exclusions>
32                 <exclusion>
33                     <groupId>org.junit.vintage</groupId>
34                     <artifactId>junit-vintage-engine</artifactId>
35                 </exclusion>
36             </exclusions>
37         </dependency>
38     </dependencies>
39 
40     <build>
41         <plugins>
42             <plugin>
43                 <groupId>org.springframework.boot</groupId>
44                 <artifactId>spring-boot-maven-plugin</artifactId>
45             </plugin>
46         </plugins>
47     </build>
48 
49 </project>
View Code

相关文章:

  • 2021-12-04
  • 2021-10-13
  • 2021-04-30
  • 2021-05-17
  • 2021-10-21
  • 2021-07-13
  • 2021-09-17
猜你喜欢
  • 2021-06-08
  • 2021-06-18
  • 2021-12-14
  • 2021-05-09
  • 2021-08-14
  • 2021-11-07
  • 2021-06-13
相关资源
相似解决方案