SpringBoot: Unable to find a single main class from the following candidates

后端 未结 11 1889
旧巷少年郎
旧巷少年郎 2020-12-13 00:06

I\'ve generated a Spring Boot web application using Spring Initializer, embedded Tomcat, Thymeleaf template engine.Technologies used: Spring Boot 1.4.2.RELEASE, Spring 4.3.4

11条回答
  •  庸人自扰
    2020-12-13 00:42

    [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.2.RELEASE:repackage (default) on project book: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.2.RELEASE:repackage failed: Unable to find a single main class from the following candidates [com.tdk.BookApplication, com.tdk.BookApplicationWar] 
    

    One possible reason to getting following error is more than one main methods in your code, Spring boot allow only one main method across all class in same project.

提交回复
热议问题