精选圈子榜单优站
编程综合
编程综合
技术
20关注
编程技术记录、分享 ,记录你的编程生活点点滴滴!

Unable to find a single main class from the following candidates[com.nemo.util.UuidUtil]


有个项目是用springboot搭建的,在配置打包的时候出现了这个问题:

Unable to find a single main class from the following candidates[com.nemo.util.UuidUtil]


查看错误,显然声称是UuidUtil的锅。然而其实并不然。

解决方案是在打包插件中,添加启动class的配置即可。

<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.nemo.startUp</mainClass>
<outputDirectory>${basedir}/../target/</outputDirectory>
</configuration>
<executions>
<execution>
<id>repackage</id>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>

  • 若文章侵犯了您的权益,请联系我们进行处理。

  • 2017-12-18
  • 5432阅读
评论