SpringBoot-02:SpringBoot中的POM文件详细解释

 

 

------------吾亦无他,唯手熟尔,谦卑若愚,好学若饥-------------

 

 

我把pom文件,以及它的详细解释发出来

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <!--model的版本-->
    <modelVersion>4.0.0</modelVersion>

    <!--创建的时候group的包名-->
    <groupId>cn.dawn</groupId>
    <!--创建时候指定的名字-->
    <artifactId>z03springbootmyself_ssm</artifactId>
    <!--版本号,snapshot   是快照-->
    <version>0.0.1-SNAPSHOT</version>
    <!--一会用maven打包项目的方式,jar或者war-->
    <packaging>jar</packaging>

    <!--指定的名字-->
    <name>z03springbootmyself_ssm</name>
    <!--你对项目的描述-->
    <description>Demo project for Spring Boot</description>

    <!--spring-boot-starter-parent:包含了大量配置好的依赖管理,
    在自己项目添加这些依赖的时候不需要写<version>版本号-->
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.3.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <!--jdk和编码-->
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <!--jar包目录-->
    <dependencies>
        <!--由于创建的是springboot下的web项目,所以,默认会有这个-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <!--单测-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>

        <!--xml配置,此是为了将来整合Hibernate或者mybatis
            默认没有需要配置
        -->
            <resources>
                <resource>
                    <directory>src/main/java</directory>
                    <includes>
                        <include>**/*.properties</include>
                        <include>**/*.xml</include>
                    </includes>
                </resource>
                <resource>
                    <directory>src/main/resources</directory>
                    <includes>
                        <include>**/*.*</include>
                    </includes>
                </resource>
            </resources>
        <!--maven的插件,可以用很多的maven功能-->
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>


</project>

 

posted @ 2018-06-22 17:32  晨曦Dawn  阅读(845)  评论(0编辑  收藏  举报