Nemo

Nemo 关注TA

路漫漫其修远兮,吾将上下而求索。

Nemo

Nemo

关注TA

路漫漫其修远兮,吾将上下而求索。

  •  普罗旺斯
  • 负责帅就完事了
  • 写了1,493,291字

该文章投稿至Nemo社区   Java  板块 复制链接


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

发布于 2017/12/18 10:35 4,951浏览 0回复 731

有个项目是用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>
点赞(0)
点了个评