Search in sources :

Example 1 with UndertowDeploymentInfoCustomizer

use of org.springframework.boot.context.embedded.undertow.UndertowDeploymentInfoCustomizer in project shinyproxy by openanalytics.

the class ShinyProxyApplication method servletContainer.

@Bean
public EmbeddedServletContainerFactory servletContainer() {
    UndertowEmbeddedServletContainerFactory factory = new UndertowEmbeddedServletContainerFactory();
    factory.addDeploymentInfoCustomizers(new UndertowDeploymentInfoCustomizer() {

        @Override
        public void customize(DeploymentInfo deploymentInfo) {
            deploymentInfo.addInitialHandlerChainWrapper(new RootHandlerWrapper());
        }
    });
    factory.setPort(Integer.parseInt(environment.getProperty("shiny.proxy.port", "8080")));
    return factory;
}
Also used : UndertowEmbeddedServletContainerFactory(org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory) DeploymentInfo(io.undertow.servlet.api.DeploymentInfo) UndertowDeploymentInfoCustomizer(org.springframework.boot.context.embedded.undertow.UndertowDeploymentInfoCustomizer) Bean(org.springframework.context.annotation.Bean)

Aggregations

DeploymentInfo (io.undertow.servlet.api.DeploymentInfo)1 UndertowDeploymentInfoCustomizer (org.springframework.boot.context.embedded.undertow.UndertowDeploymentInfoCustomizer)1 UndertowEmbeddedServletContainerFactory (org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory)1 Bean (org.springframework.context.annotation.Bean)1