uyl*_*lmz 2 java servlet-container spring-boot jhipster
我知道您可以构建一个WAR文件来部署到应用程序服务器,但是在运行主Application类时会创建什么样的服务器?
/**
* 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"));
}
Run Code Online (Sandbox Code Playgroud)
默认情况下,Spring Boot使用Tomcat.您可以将其配置为使用Jetty或Undertow作为嵌入式容器.您可以检查pom.xml并查看是否有任何引用.如果没有,你可以假设,它是Tomcat
| 归档时间: |
|
| 查看次数: |
2171 次 |
| 最近记录: |