本文整理了Java中org.eclipse.jetty.webapp.WebAppContext.getObjectFactory()
方法的一些代码示例,展示了WebAppContext.getObjectFactory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.getObjectFactory()
方法的具体详情如下:
包路径:org.eclipse.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:getObjectFactory
暂无
代码示例来源:origin: org.eclipse.jetty/jetty-plus
@Override
public void preConfigure (WebAppContext context)
throws Exception
{
context.getObjectFactory().addDecorator(new PlusDecorator(context));
}
代码示例来源:origin: org.eclipse.jetty/jetty-plus
@Override
public void cloneConfigure(WebAppContext template, WebAppContext context) throws Exception
{
context.getObjectFactory().addDecorator(new PlusDecorator(context));
}
代码示例来源:origin: org.eclipse.jetty/jetty-annotations
/**
* @see org.eclipse.jetty.webapp.AbstractConfiguration#cloneConfigure(org.eclipse.jetty.webapp.WebAppContext, org.eclipse.jetty.webapp.WebAppContext)
*/
@Override
public void cloneConfigure(WebAppContext template, WebAppContext context) throws Exception
{
context.getObjectFactory().addDecorator(new AnnotationDecorator(context));
}
代码示例来源:origin: com.carecon.fabric3/fabric3-container-web-jetty
private WebAppContext createWebAppContext(String contextPath, Map<String, List<Injector<?>>> injectors, List<URL> locations, ClassLoader parentClassLoader)
throws IOException {
WebAppContext context;
if (locations.size() == 1) {
context = new ManagedWebAppContext(locations.get(0).toExternalForm(), contextPath);
} else {
context = new ManagedWebAppContext(null, contextPath);
// add the resource paths
String[] paths = new String[locations.size()];
for (int i = 0; i < locations.size(); i++) {
URL location = locations.get(i);
paths[i] = (location.toExternalForm());
}
ResourceCollection resources = new ResourceCollection(paths);
context.setBaseResource(resources);
}
context.setParentLoaderPriority(true);
InjectingDecorator decorator = new InjectingDecorator(injectors);
context.getObjectFactory().addDecorator(decorator);
WebAppClassLoader webAppClassLoader = new WebAppClassLoader(parentClassLoader, context);
context.setClassLoader(webAppClassLoader);
// don't extract the war since this has already been done by the WAR classpath processor
context.setExtractWAR(false);
Configuration[] configurations = createConfigurations();
context.setConfigurations(configurations);
return context;
}
代码示例来源:origin: org.fabric3/fabric3-container-web-jetty
private WebAppContext createWebAppContext(String contextPath, Map<String, List<Injector<?>>> injectors, List<URL> locations, ClassLoader parentClassLoader)
throws IOException {
WebAppContext context;
if (locations.size() == 1) {
context = new ManagedWebAppContext(locations.get(0).toExternalForm(), contextPath);
} else {
context = new ManagedWebAppContext(null, contextPath);
// add the resource paths
String[] paths = new String[locations.size()];
for (int i = 0; i < locations.size(); i++) {
URL location = locations.get(i);
paths[i] = (location.toExternalForm());
}
ResourceCollection resources = new ResourceCollection(paths);
context.setBaseResource(resources);
}
context.setParentLoaderPriority(true);
InjectingDecorator decorator = new InjectingDecorator(injectors);
context.getObjectFactory().addDecorator(decorator);
WebAppClassLoader webAppClassLoader = new WebAppClassLoader(parentClassLoader, context);
context.setClassLoader(webAppClassLoader);
// don't extract the war since this has already been done by the WAR classpath processor
context.setExtractWAR(false);
Configuration[] configurations = createConfigurations();
context.setConfigurations(configurations);
return context;
}
代码示例来源:origin: hammock-project/hammock
context.setContextPath("/");
context.setResourceBase(webServerConfiguration.getFileDir());
context.getObjectFactory().addDecorator(new HammockDecorator());
super.getInitParams().forEach(context::setInitParameter);
getListeners().stream().map(JettyWebServer::getOrCreateListener).forEach(context::addEventListener);
代码示例来源:origin: org.eclipse.jetty/jetty-annotations
public void configure(WebAppContext context) throws Exception
context.getObjectFactory().addDecorator(new AnnotationDecorator(context));
代码示例来源:origin: org.eclipse.jetty/jetty-quickstart
context.getObjectFactory().addDecorator(new AnnotationDecorator(context)); //this must be the last Decorator because they are run in reverse order!
内容来源于网络,如有侵权,请联系作者删除!