通过命令行在后台运行引导服务程序的命令:

huangapple go评论69阅读模式
英文:

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>



huangapple
  • 本文由 发表于 2020年5月31日 04:35:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/62108364.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定