Springboot的pox文件(自己常用的)


<?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.0modelVersion>

    
    <parent>
        <groupId>org.springframework.bootgroupId>
        <artifactId>spring-boot-starter-parentartifactId>
        <version>2.3.5.RELEASEversion>
        <relativePath/> 
    parent>
    <groupId>org.examplegroupId>
    <artifactId>springboot-studyartifactId>
    <version>1.0-SNAPSHOTversion>

    <properties>
        <java.version>1.8java.version>
    properties>

    <dependencies>

        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-webartifactId>
            
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.bootgroupId>
                    <artifactId>spring-boot-starter-tomcatartifactId>
                exclusion>
            exclusions>
        dependency>

        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-undertowartifactId>
        dependency>

        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-aopartifactId>
        dependency>

        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-devtoolsartifactId>
            <scope>runtimescope>
            
            <optional>trueoptional>
        dependency>

        
        <dependency>
            <groupId>org.projectlombokgroupId>
            <artifactId>lombokartifactId>
            <optional>trueoptional>
        dependency>

        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-testartifactId>
            <scope>testscope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintagegroupId>
                    <artifactId>junit-vintage-engineartifactId>
                exclusion>
            exclusions>
        dependency>
    dependencies>

    <build>
        <plugins>
            
            <plugin>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-maven-pluginartifactId>
            plugin>
            
            <plugin>
                <artifactId>maven-clean-pluginartifactId>
                <version>3.1.0version>
            plugin>
            <plugin>
                <artifactId>maven-compiler-pluginartifactId>
                <version>3.8.1version>
            plugin>
            <plugin>
                <artifactId>maven-deploy-pluginartifactId>
                <version>2.8.2version>
            plugin>
            <plugin>
                <artifactId>maven-install-pluginartifactId>
                <version>2.5.2version>
            plugin>
            <plugin>
                <artifactId>maven-jar-pluginartifactId>
                <version>3.2.0version>
            plugin>
            <plugin>
                <artifactId>maven-resources-pluginartifactId>
                <version>3.1.0version>
            plugin>
            <plugin>
                <artifactId>maven-site-pluginartifactId>
                <version>3.3version>
            plugin>
            <plugin>
                <artifactId>maven-surefire-pluginartifactId>
                <version>2.22.2version>
            plugin>

        plugins>
    build>

project><?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.0modelVersion>

    
    <parent>
        <groupId>org.springframework.bootgroupId>
        <artifactId>spring-boot-starter-parentartifactId>
        <version>2.3.5.RELEASEversion>
        <relativePath/> 
    parent>
    <groupId>org.examplegroupId>
    <artifactId>springboot-studyartifactId>
    <version>1.0-SNAPSHOTversion>

    <properties>
        <java.version>1.8java.version>
    properties>

    <dependencies>

        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-webartifactId>
            
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.bootgroupId>
                    <artifactId>spring-boot-starter-tomcatartifactId>
                exclusion>
            exclusions>
        dependency>

        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-undertowartifactId>
        dependency>

        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-aopartifactId>
        dependency>

        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-devtoolsartifactId>
            <scope>runtimescope>
            
            <optional>trueoptional>
        dependency>

        
        <dependency>
            <groupId>org.projectlombokgroupId>
            <artifactId>lombokartifactId>
            <optional>trueoptional>
        dependency>

        
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starter-testartifactId>
            <scope>testscope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintagegroupId>
                    <artifactId>junit-vintage-engineartifactId>
                exclusion>
            exclusions>
        dependency>
    dependencies>

    <build>
        <plugins>
            
            <plugin>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-maven-pluginartifactId>
            plugin>
            
            <plugin>
                <artifactId>maven-clean-pluginartifactId>
                <version>3.1.0version>
            plugin>
            <plugin>
                <artifactId>maven-compiler-pluginartifactId>
                <version>3.8.1version>
            plugin>
            <plugin>
                <artifactId>maven-deploy-pluginartifactId>
                <version>2.8.2version>
            plugin>
            <plugin>
                <artifactId>maven-install-pluginartifactId>
                <version>2.5.2version>
            plugin>
            <plugin>
                <artifactId>maven-jar-pluginartifactId>
                <version>3.2.0version>
            plugin>
            <plugin>
                <artifactId>maven-resources-pluginartifactId>
                <version>3.1.0version>
            plugin>
            <plugin>
                <artifactId>maven-site-pluginartifactId>
                <version>3.3version>
            plugin>
            <plugin>
                <artifactId>maven-surefire-pluginartifactId>
                <version>2.22.2version>
            plugin>

        plugins>
    build>

project>

相关