About SpringBoot packaged solution project is not packaged with the dependent jar package

Generally not packaged together since pom not inherited from spring-boot-starter-parent resulting in the need to write the following configuration file pom.xml

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                 <mainClass> com.szmirren.Main </ mainClass>  <-! Your main class full path ->
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</ build> 
then execute: maven install

 

Guess you like

Origin www.cnblogs.com/hjieone/p/11139812.html