英文:
Command to run boot service program from background (through command line)
问题
@SpringBootApplication
public class IFMApp extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(IFMApp.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(IFMApp.class);
}
}
我想要通过命令行(Linux 终端)运行上述引导服务程序(IFMApp)。
我构建的 War/Jar 文件:
1. ifmservice.war
2. ifmservice-jar-with-dependencies.jar
3. ifmservice-tests.jar
将不胜感激地提供帮助。谢谢
<details>
<summary>英文:</summary>
@SpringBootApplication
public class IFMApp extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(IFMApp.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(IFMApp.class);
}
}
I want to run above boot service program (IFMApp) through the command line (linux terminal).
The War/Jar files i built:-
**1.** ifmservice.war
**2.** ifmservice-jar-with-dependencies.jar
**3.** ifmservice-tests.jar
Help will be greatly appreciated. Thanks
</details>
# 答案1
**得分**: 1
首先,进入您项目中的目标文件夹,然后输入:
java -jar 您的jar文件名
<details>
<summary>英文:</summary>
Firstly ,go to your target folder in your project and then type in :
java -jar your_jar_Name
</details>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论