项目通用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>
相关推荐
阿华的代码王国1 天前
【Android】CheckBox实现和监听
android·xml·java
阿华的代码王国1 天前
【Android】按钮的使用
android·xml·java
浮江雾2 天前
XXE漏洞1-XXE 漏洞简介-XML 语法-DTD 讲解-外部实体讲解
xml·安全·web安全·漏洞·xxe
代码的余温2 天前
XML vs JSON:核心区别与最佳选择
xml·服务器·json
Raners_2 天前
【Java代码审计(2)】MyBatis XML 注入审计
xml·java·安全·网络安全·mybatis
超级小忍5 天前
在 Spring Boot 中使用 MyBatis 的 XML 文件编写 SQL 语句详解
xml·spring boot·mybatis
你我约定有三5 天前
spring--xml注入时bean的property属性
xml·java·spring
12345,catch a tiger5 天前
实用技巧 Excel 与 XML互转
xml
24kHT5 天前
xml映射文件的方式操作mybatis
xml·mybatis
石头wang6 天前
xml 知识总结: xsd,xsi:schemaLocation,xmlns,xmlns:xsi
xml