本文整理汇总了Java中org.springframework.boot.context.embedded.undertow.UndertowDeploymentInfoCustomizer类的典型用法代码示例。如果您正苦于以下问题:Java UndertowDeploymentInfoCustomizer类的具体用法?Java UndertowDeploymentInfoCustomizer怎么用?Java UndertowDeploymentInfoCustomizer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UndertowDeploymentInfoCustomizer类属于org.springframework.boot.context.embedded.undertow包,在下文中一共展示了UndertowDeploymentInfoCustomizer类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: embeddedServletContainerFactory
import org.springframework.boot.context.embedded.undertow.UndertowDeploymentInfoCustomizer; //导入依赖的package包/类
@Bean
public UndertowEmbeddedServletContainerFactory
embeddedServletContainerFactory(
ConfigProvider<UndertowConfig> cfg) {
int port = cfg.defaultReadConfig().findFirst().get().getPort();
UndertowEmbeddedServletContainerFactory factory =
new UndertowEmbeddedServletContainerFactory(port);
factory.addBuilderCustomizers((UndertowBuilderCustomizer) builder -> { // (*)
builder.setServerOption(UndertowOptions.DECODE_URL, true);
builder.setServerOption(UndertowOptions.URL_CHARSET,
StandardCharsets.UTF_8.name());
});
factory.addDeploymentInfoCustomizers(
(UndertowDeploymentInfoCustomizer) deployment -> { // (*)
deployment.setDefaultEncoding(StandardCharsets.UTF_8.name());
});
return factory;
}
开发者ID:openmicroscopy,项目名称:omero-ms-queue,代码行数:24,代码来源:WebWiring.java
示例2: enableAuthUDICustomizer
import org.springframework.boot.context.embedded.undertow.UndertowDeploymentInfoCustomizer; //导入依赖的package包/类
private UndertowDeploymentInfoCustomizer enableAuthUDICustomizer() {
return (DeploymentInfo di) -> {
if(StringUtils.isEmpty(encodedPass)) {
return;
}
SecurityConstraint sc = new SecurityConstraint();
sc.setEmptyRoleSemantic(SecurityInfo.EmptyRoleSemantic.AUTHENTICATE);
// empty web resource interpret as default
sc.addWebResourceCollection(new WebResourceCollection());
di.addSecurityConstraints(sc);
di.setSecurityDisabled(false);
di.setAuthenticationMode(AuthenticationMode.PRO_ACTIVE);
di.setLoginConfig(new LoginConfig(HttpServletRequest.BASIC_AUTH, "Haven Agent"));
di.setIdentityManager(new IdentityManagerImpl(encodedPass));
};
}
开发者ID:codeabovelab,项目名称:haven-platform,代码行数:17,代码来源:AuthConfiguration.java
示例3: embeddedServletContainerFactory
import org.springframework.boot.context.embedded.undertow.UndertowDeploymentInfoCustomizer; //导入依赖的package包/类
@Bean
@Autowired
public UndertowEmbeddedServletContainerFactory embeddedServletContainerFactory(List<UndertowDeploymentInfoCustomizer> customizers) {
UndertowEmbeddedServletContainerFactory factory = new UndertowEmbeddedServletContainerFactory();
for (UndertowDeploymentInfoCustomizer customizer : customizers) {
factory.addDeploymentInfoCustomizers(customizer);
}
return factory;
}
开发者ID:syndesisio,项目名称:syndesis,代码行数:10,代码来源:Application.java
示例4: servletContainer
import org.springframework.boot.context.embedded.undertow.UndertowDeploymentInfoCustomizer; //导入依赖的package包/类
@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;
}
开发者ID:openanalytics,项目名称:shinyproxy,代码行数:13,代码来源:ShinyProxyApplication.java
注:本文中的org.springframework.boot.context.embedded.undertow.UndertowDeploymentInfoCustomizer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论