javaspring-bootjhipsterservlet-container

What server does jhipster use?


I know you can build a WAR file to deploy to an application server, but what kind of server is created when you run the main Application class?

/**
 * 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"));
}

Solution

  • By default Spring Boot uses Tomcat. You can configure it to use Jetty or Undertow as embedded container. You can check your pom.xml and see if there are any references to them. If not, you can assume, it is Tomcat