Class WebConfigurer

  • All Implemented Interfaces:
    org.springframework.boot.web.server.WebServerFactoryCustomizer<org.springframework.boot.web.server.WebServerFactory>, org.springframework.boot.web.servlet.ServletContextInitializer

    @Configuration
    public class WebConfigurer
    extends Object
    implements org.springframework.boot.web.servlet.ServletContextInitializer, org.springframework.boot.web.server.WebServerFactoryCustomizer<org.springframework.boot.web.server.WebServerFactory>
    Configuration of web application with Servlet 3.0 APIs.
    • Constructor Detail

      • WebConfigurer

        public WebConfigurer​(org.springframework.core.env.Environment env,
                             io.github.jhipster.config.JHipsterProperties jHipsterProperties)
    • Method Detail

      • onStartup

        public void onStartup​(javax.servlet.ServletContext servletContext)
                       throws javax.servlet.ServletException
        Specified by:
        onStartup in interface org.springframework.boot.web.servlet.ServletContextInitializer
        Throws:
        javax.servlet.ServletException
      • customize

        public void customize​(org.springframework.boot.web.server.WebServerFactory server)
        Customize the Servlet engine: Mime types, the document root, the cache.
        Specified by:
        customize in interface org.springframework.boot.web.server.WebServerFactoryCustomizer<org.springframework.boot.web.server.WebServerFactory>
      • corsFilter

        @Bean
        public org.springframework.web.filter.CorsFilter corsFilter()
      • setMetricRegistry

        @Autowired(required=false)
        public void setMetricRegistry​(com.codahale.metrics.MetricRegistry metricRegistry)