use of org.springframework.boot.context.embedded.undertow.UndertowBuilderCustomizer in project atlasmap by atlasmap.
the class AtlasItestsConfiguration method create.
@Bean
public UndertowEmbeddedServletContainerFactory create() throws Exception {
UndertowEmbeddedServletContainerFactory factory = new UndertowEmbeddedServletContainerFactory();
factory.setPort(Integer.parseInt(properties.getProperty("http.port", "8585")));
factory.setAddress(InetAddress.getByName(properties.getProperty("http.host", "localhost")));
factory.addBuilderCustomizers(new UndertowBuilderCustomizer() {
public void customize(Builder builder) {
try {
builder.addHttpsListener(Integer.parseInt(properties.getProperty("https.port", "8443")), properties.getProperty("https.host", "localhost"), createSslContext());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
});
return factory;
}
use of org.springframework.boot.context.embedded.undertow.UndertowBuilderCustomizer in project Synergy by Meggot.
the class EmbeddedServletConfiguration method jettyEmbeddedServletContainerFactory.
@Bean
public UndertowEmbeddedServletContainerFactory jettyEmbeddedServletContainerFactory() {
final UndertowEmbeddedServletContainerFactory factory = new UndertowEmbeddedServletContainerFactory();
factory.addBuilderCustomizers(new UndertowBuilderCustomizer() {
@Override
public void customize(final Undertow.Builder builder) {
builder.addHttpListener(port, "localhost");
}
});
return factory;
}
Aggregations