【发布时间】:2018-10-02 06:59:55
【问题描述】:
我在 Spring Boot 中有 2 个实现命令行运行器的类。它们基本上是这样的:
@SpringBootApplication
@ComponentScan("com.xxxx")
public class Application implements CommandLineRunner {
第二个看起来像:
@SpringBootApplication
@ComponentScan("com.xxxx")
public class ApplicationWorklfow implements CommandLineRunner {
它们编译得很好。但是当我尝试使用 java -jar 运行它时,我得到了一个错误,大概是因为 spring 不知道要运行哪个。
是否有我可以使用的命令告诉 jar 我正在尝试运行哪个应用程序?
【问题讨论】:
标签: spring-boot