如果您有多个主类,则需要在每个概要文件中显式配置主类:
<profiles> <profile> <id>profile1</id> <properties> <spring.boot.mainclass>com.SomeClass</spring.boot.mainclass> </properties> </profile> <profile> <id>profile2</id> <properties> <spring.boot.mainclass>com.SomeOtherClass</spring.boot.mainclass> </properties> </profile></profiles>
…
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>1.5.2.RELEASE</version> <executions> <execution> <goals> <goal>repackage</goal> </goals> <configuration> <mainClass>${spring.boot.mainclass}</mainClass> </configuration> </execution> </executions> ...</plugin>
参见 spring-boot:repackage
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)