2021-08-17-DAY1,pom.xml介绍

项目开始前  pom.xml介绍

1,idea maven打包按钮介绍

 

 

<properties>
    <java.version>2.5.2</java.version>

    <!--跳过测试类打包-->
    <skipTests>true</skipTests>
    
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <spring-boot.version>2.5.2</spring-boot.version>
</properties>

4.maven 打包未生成target目录

5、parenta标签作用

<parent>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-starter-parent</artifactId>
     <version>2.5.2</version>
</parent>

6、<dependency>标签

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

 7、测试类项目打包

package com.jt.springboot_demo1;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class SpringbootDemo1ApplicationTests {

    @Test
    void contextLoads() {
    }

}

8、<build>标签

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>2.5.2</version>

            <configuration>
                <mainClass>com.jt.springboot_demo1.SpringbootDemo1Application</mainClass>
            </configuration>
            <executions>
                <execution>
                    <id>repackage</id>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

猜你喜欢

转载自blog.csdn.net/weixin_56762231/article/details/119762160