有个项目是用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>