项目通用pom.xml文件模版

pom.xml模版文件

xml 复制代码
    <?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">
        <modelVersion>4.0.0</modelVersion>
    
        <!--本项目信息-->
        <groupId>com.xie</groupId>
        <artifactId>StudentDemoXie12</artifactId>
        <version>1.0-SNAPSHOT</version>
    
        <!--项目编译器版本号-->
        <properties>
            <java.version>8</java.version>
        </properties>
    
        <!--依赖父工程-->
        <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>2.1.6.RELEASE</version>
            <relativePath/>
        </parent>
    
        <!--第三方依赖项集-->
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-thymeleaf</artifactId>
            </dependency>
    
            <!--JPA-->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-data-jpa</artifactId>
            </dependency>
    
            <!--MySQL 加入此依赖后一定要在配置文件配置数据源-->
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <scope>runtime</scope>
            </dependency>
    
            <!---->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter</artifactId>
            </dependency>
    
            <!--SpringBoot集成Junit5以上版本-->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-test</artifactId>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.junit.vintage</groupId>
                        <artifactId>junit-vintage-engine</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
    
            <!--web-->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
                <scope>compile</scope>
            </dependency>
    
            <!--lombok-->
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <optional>true</optional>
            </dependency>
    
            <!--swagger2-->
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger2</artifactId>
                <version>2.9.2</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger-ui</artifactId>
                <version>2.9.2</version>
            </dependency>
    
            <!--自动部署-->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-devtools</artifactId>
                <scope>runtime</scope>
                <optional>true</optional>
            </dependency>
        </dependencies>
    
        <!--maven7插件依赖-->
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.tomcat.maven</groupId>
                    <artifactId>tomcat7-maven-plugin</artifactId>
                    <version>2.1</version>
                    <configuration>
                        <!--端口配置-->
                        <port>8080</port>
                        <!--项目访问路径配置-->
                        <path>/</path>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </project>
相关推荐
张人玉10 小时前
XML 序列化与操作详解笔记
xml·前端·笔记
阿华的代码王国3 天前
【Android】适配器与外部事件的交互
android·xml·java·前端·后端·交互
阿华的代码王国3 天前
【Android】RecyclerView复用CheckBox的异常状态
android·xml·java·前端·后端
DavieLau5 天前
C#项目WCF接口暴露调用及SOAP接口请求测试(Python版)
xml·服务器·开发语言·python·c#
曹牧5 天前
XML头部声明发送者信息的实现方法
xml
寒士obj6 天前
熟悉并使用Spring框架 - XML篇
xml·java·spring
Arva .6 天前
Spring基于XML的自动装配
xml·java·spring
fatfishccc6 天前
循序渐进学 Spring (上):从 IoC/DI 核心原理到 XML 配置实战
xml·java·数据库·spring·intellij-idea·ioc·di
fatfishccc10 天前
【MyBatis新手避坑】详解 `Could not find resource ...Mapper.xml` 错误
xml·intellij-idea·mybatis
helloworld工程师11 天前
Dubbo应用开发之基于xml的第一个Dubbo程序
xml·dubbo·safari