gpt4 book ai didi

java - jhipster使用什么服务器?

转载 作者:行者123 更新时间:2023-12-02 06:01:36 32 4
gpt4 key购买 nike

我知道您可以构建一个 WAR 文件来部署到应用程序服务器,但是当您运行主应用程序类时会创建什么样的服务器?

/**
* Main method, used to run the application.
*/
public static void main(String[] args) throws UnknownHostException {
SpringApplication app = new SpringApplication(Application.class);
SimpleCommandLinePropertySource source = new SimpleCommandLinePropertySource(args);
addDefaultProfile(app, source);
Environment env = app.run(args).getEnvironment();
log.info("Access URLs:\n-----------------------------------------------------\n\t" +
"Local: \t\thttp://127.0.0.1:{}\n\t" +
"External: \thttp://{}:{}\n-----------------------------------------------",
env.getProperty("server.port"),
InetAddress.getLocalHost().getHostAddress(),
env.getProperty("server.port"));
}

最佳答案

默认情况下 Spring Boot 使用 Tomcat。您可以将其配置为使用 Jetty or Undertow作为嵌入式容器。您可以检查您的 pom.xml 并查看是否有对它们的引用。如果不是,您可以假设它是 Tomcat

关于java - jhipster使用什么服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33762549/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com