Solution to the problem that the jar file packaged by Maven is only a few kb

1. Add the following code to the pom file

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

2. Open the maven tool sidebar of IDE

Click to skip the test mode, otherwise an error will be reported

 

Then click package

3. Packing

normal size

 

Guess you like

Origin blog.csdn.net/weixin_55127182/article/details/132393417