springboot学习之旅(002):pom文件解读

github源码自取(springboot-road)

 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 http://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.1.6.RELEASE</version>
 9         <relativePath/> <!-- lookup parent from repository -->
10     </parent>
11     <groupId>com.chudonghai</groupId><!--项目目录-->
12     <artifactId>springboot-road</artifactId>
13     <version>0.0.1-SNAPSHOT</version>
14     <name>springboot-road</name><!--这是你的项目名-->
15     <description>Demo project for Spring Boot</description>
16 
17     <properties><!--属性配置:jdk版本,编码格式-->
18         <java.version>1.8</java.version>
19         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20     </properties>
21 
22     <dependencies>
23         <dependency><!--创建wei项目,要添加这个web启动器-->
24             <groupId>org.springframework.boot</groupId>
25             <artifactId>spring-boot-starter-web</artifactId>
26         </dependency>
27 
28         <!--页面模板-->
29         <dependency><!--如果要返回一个页面,要是用模板,这里选用了Thymeleaf模板-->
30             <groupId>org.springframework.boot</groupId>
31             <artifactId>spring-boot-starter-thymeleaf</artifactId>
32         </dependency>
33 
34         <dependency>
35             <groupId>org.springframework.boot</groupId>
36             <artifactId>spring-boot-starter-test</artifactId>
37             <scope>test</scope>
38         </dependency>
39         <!--热部署 Hot Deployment-->
40         <dependency>
41             <groupId>org.springframework.boot</groupId>
42             <artifactId>spring-boot-devtools</artifactId>
43             <optional>true</optional>
44         </dependency>
45 
46     </dependencies>
47 
48     <build>
49         <plugins>
50             <plugin>
51                 <groupId>org.springframework.boot</groupId>
52                 <artifactId>spring-boot-maven-plugin</artifactId>
53                 <configuration><!--这里要加上这个配置,上面的热部署才会生效-->
54                     <fork>true</fork>
55                 </configuration>
56             </plugin>
57         </plugins>
58     </build>
59 
60 </project>

 

posted @ 2019-08-16 16:01  向南风  阅读(247)  评论(0编辑  收藏  举报