创建springboot的一般会依赖springboot的parent或者导入pring-boot-dependencies
- 如果是依赖springboot的parent项目遇到 *.jar中没有主清单属性 解决办法
则需要添加此插件
<properties>
<start-class>com.lmt.springcloud.EurekaServerMain7001</start-class>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
- 导入pring-boot-dependencies遇到*.jar中没有主清单属性解决办法
<properties>
<start-class>com.lmt.springcloud.EurekaServerMain7001</start-class>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>repackage</id>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>${start-class}</mainClass>
</configuration>
</plugin>
</plugins>
</build>