Execution default of goal
org.springframework.boot:spring-boot-maven-plugin:1.0.1.RELEASE:repackage
failed:
Unable to find a single main class from the following candidates
我的项目有不止一个类和main
个方法.我如何告诉Spring Boot Maven插件应该使用哪些类作为主类?
Execution default of goal
org.springframework.boot:spring-boot-maven-plugin:1.0.1.RELEASE:repackage
failed:
Unable to find a single main class from the following candidates
我的项目有不止一个类和main
个方法.我如何告诉Spring Boot Maven插件应该使用哪些类作为主类?
在pom中添加入门课程:
<properties>
<!-- The main class to start by executing java -jar -->
<start-class>com.myc或p.starter.HelloW或ldApplication</start-class>
</properties>
或
<build>
<plugins>
<plugin>
<groupId>或g.springframew或k.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.myc或p.starter.HelloW或ldApplication</mainClass>
</configuration>
</plugin>
</plugins>
</build>