本文整理汇总了Java中org.eclipse.jetty.webapp.AbstractConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java AbstractConfiguration类的具体用法?Java AbstractConfiguration怎么用?Java AbstractConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AbstractConfiguration类属于org.eclipse.jetty.webapp包,在下文中一共展示了AbstractConfiguration类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: servletContainerCustomizer
import org.eclipse.jetty.webapp.AbstractConfiguration; //导入依赖的package包/类
@Bean
@Autowired
public EmbeddedServletContainerCustomizer servletContainerCustomizer(ServerProperties properties) {
return container -> {
if (container instanceof JettyEmbeddedServletContainerFactory) {
JettyEmbeddedServletContainerFactory jettyContainer = (JettyEmbeddedServletContainerFactory) container;
jettyContainer.addConfigurations(new AbstractConfiguration() {
@Override
public void configure(WebAppContext context) throws Exception {
properties.getContextParameters().forEach((k, v) -> context.setInitParameter(k, v));
}
});
}
};
}
示例2: getErrorPageConfiguration
import org.eclipse.jetty.webapp.AbstractConfiguration; //导入依赖的package包/类
/**
* Create a configuration object that adds error handlers.
* @return a configuration object for adding error pages
*/
private Configuration getErrorPageConfiguration() {
return new AbstractConfiguration() {
@Override
public void configure(WebAppContext context) throws Exception {
ErrorHandler errorHandler = context.getErrorHandler();
context.setErrorHandler(new JettyEmbeddedErrorHandler(errorHandler));
addJettyErrorPages(errorHandler, getErrorPages());
}
};
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:17,代码来源:JettyEmbeddedServletContainerFactory.java
示例3: getMimeTypeConfiguration
import org.eclipse.jetty.webapp.AbstractConfiguration; //导入依赖的package包/类
/**
* Create a configuration object that adds mime type mappings.
* @return a configuration object for adding mime type mappings
*/
private Configuration getMimeTypeConfiguration() {
return new AbstractConfiguration() {
@Override
public void configure(WebAppContext context) throws Exception {
MimeTypes mimeTypes = context.getMimeTypes();
for (MimeMappings.Mapping mapping : getMimeMappings()) {
mimeTypes.addMimeMapping(mapping.getExtension(),
mapping.getMimeType());
}
}
};
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:19,代码来源:JettyEmbeddedServletContainerFactory.java
示例4: doCustomize
import org.eclipse.jetty.webapp.AbstractConfiguration; //导入依赖的package包/类
@Override
protected void doCustomize(JettyEmbeddedServletContainerFactory container) {
container.addConfigurations(new AbstractConfiguration() {
@Override
public void configure(WebAppContext context) throws Exception {
ServerContainer serverContainer = WebSocketServerContainerInitializer
.configureContext(context);
ShutdownThread.deregister(serverContainer);
}
});
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:14,代码来源:JettyWebSocketContainerCustomizer.java
示例5: getErrorPageConfiguration
import org.eclipse.jetty.webapp.AbstractConfiguration; //导入依赖的package包/类
/**
* Create a configuration object that adds error handlers.
* @return a configuration object for adding error pages
*/
private Configuration getErrorPageConfiguration() {
return new AbstractConfiguration() {
@Override
public void configure(WebAppContext context) throws Exception {
ErrorHandler errorHandler = context.getErrorHandler();
addJettyErrorPages(errorHandler, getErrorPages());
}
};
}
示例6: getMimeTypeConfiguration
import org.eclipse.jetty.webapp.AbstractConfiguration; //导入依赖的package包/类
/**
* Create a configuration object that adds mime type mappings.
* @return a configuration object for adding mime type mappings
*/
private Configuration getMimeTypeConfiguration() {
return new AbstractConfiguration() {
@Override
public void configure(WebAppContext context) throws Exception {
MimeTypes mimeTypes = context.getMimeTypes();
for (MimeMappings.Mapping mapping : getMimeMappings()) {
mimeTypes.addMimeMapping(mapping.getExtension(),
mapping.getMimeType());
}
}
};
}