在报错的modules的pom内加上下面的插件即可。

    <build>
       <plugins>
           <!-- 不加这个参数打jar包会报未找到main方法 -->
           <plugin>
               <groupId>org.springframework.boot</groupId>
               <artifactId>spring-boot-maven-plugin</artifactId>
               <version>2.4.1</version>
               <configuration>
                   <includeSystemScope>true</includeSystemScope>
                   <mainClass>cn.vantee.EurekaServerStarter7001</mainClass>
               </configuration>
               <executions>
                   <execution>
                       <goals>
                           <goal>repackage</goal>
                       </goals>
                   </execution>
               </executions>
           </plugin>
       </plugins>
    </build>

相关文章:

  • 2021-12-10
  • 2021-12-08
  • 2021-10-23
  • 2021-12-22
  • 2021-08-01
  • 2021-05-18
  • 2021-09-12
猜你喜欢
  • 2021-12-05
  • 2021-07-01
  • 2021-12-25
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
相关资源
相似解决方案