我有一个spring-boot应用程序,我需要通过命令行进入文件夹目录并启动我的Web应用程序。 我有一个名为Application.java的类,其中包含以下代码。
@SpringBootApplication(scanBasePackages = {"com.ubs.tas.topcat.dashboard"})
public class Application extends SpringBootServletInitializer {
private static final Logger LOGGER = LoggerFactory.getLogger(Application.class.getName());
private static final Class<Application> applicationClass = Application.class;
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(applicationClass);
}
public static void main(String[] args) {
LOGGER.info("Starting...");
SpringApplication.run(Application.class, args);
}
}
我设置了classpath,然后尝试运行命令 "java ApplicationUtility
",但是我收到了以下错误信息 "Could not find the main class: ApplicationUtility. Program will exist.
"