Class TomcatFactory

java.lang.Object
io.micronaut.http.ssl.SslBuilder<SSLContext>
io.micronaut.servlet.engine.server.ServletServerFactory
io.micronaut.servlet.tomcat.TomcatFactory

@Factory public class TomcatFactory extends ServletServerFactory
Factory for the Tomcat instance.
Since:
1.0.0
Author:
graemerocher
  • Constructor Details

    • TomcatFactory

      protected TomcatFactory(io.micronaut.core.io.ResourceResolver resourceResolver, TomcatConfiguration serverConfiguration, io.micronaut.http.ssl.SslConfiguration sslConfiguration, io.micronaut.context.ApplicationContext applicationContext, List<ServletStaticResourceConfiguration> staticResourceConfigurations)
      Default constructor.
      Parameters:
      resourceResolver - The resource resolver
      serverConfiguration - The server config
      sslConfiguration - The SSL config
      applicationContext - The app context
      staticResourceConfigurations - The static resource configs
  • Method Details

    • getServerConfiguration

      public TomcatConfiguration getServerConfiguration()
      Overrides:
      getServerConfiguration in class ServletServerFactory
      Returns:
      The server config
    • tomcatServer

      @Singleton @Primary protected org.apache.catalina.startup.Tomcat tomcatServer(org.apache.catalina.connector.Connector connector, MicronautServletConfiguration configuration)
      The Tomcat server bean.
      Parameters:
      connector - The connector
      configuration - The servlet configuration
      Returns:
      The Tomcat server
    • tomcatConnector

      @Singleton @Primary protected org.apache.catalina.connector.Connector tomcatConnector()
      Returns:
      Create the protocol.