本文整理汇总了Java中org.apache.camel.core.xml.AbstractCamelContextFactoryBean类的典型用法代码示例。如果您正苦于以下问题:Java AbstractCamelContextFactoryBean类的具体用法?Java AbstractCamelContextFactoryBean怎么用?Java AbstractCamelContextFactoryBean使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AbstractCamelContextFactoryBean类属于org.apache.camel.core.xml包,在下文中一共展示了AbstractCamelContextFactoryBean类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPackages
import org.apache.camel.core.xml.AbstractCamelContextFactoryBean; //导入依赖的package包/类
private String getPackages() {
// we nedd to have a class from each different package with jaxb models
// and we must use the .class for the classloader to work in OSGi
Set<Class<?>> classes = new LinkedHashSet<Class<?>>();
classes.add(CamelContextFactoryBean.class);
classes.add(AbstractCamelContextFactoryBean.class);
classes.add(SSLContextParametersFactoryBean.class);
classes.add(org.apache.camel.ExchangePattern.class);
classes.add(org.apache.camel.model.RouteDefinition.class);
classes.add(org.apache.camel.model.config.StreamResequencerConfig.class);
classes.add(org.apache.camel.model.dataformat.DataFormatsDefinition.class);
classes.add(org.apache.camel.model.language.ExpressionDefinition.class);
classes.add(org.apache.camel.model.loadbalancer.RoundRobinLoadBalancerDefinition.class);
classes.add(org.apache.camel.model.rest.RestDefinition.class);
StringBuilder packages = new StringBuilder();
for (Class<?> cl : classes) {
if (packages.length() > 0) {
packages.append(":");
}
packages.append(cl.getName().substring(0, cl.getName().lastIndexOf('.')));
}
return packages.toString();
}
示例2: setUp
import org.apache.camel.core.xml.AbstractCamelContextFactoryBean; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Override
protected void setUp() throws Exception {
if (isLazyLoadingTypeConverter()) {
System.setProperty(AbstractCamelContextFactoryBean.LAZY_LOAD_TYPE_CONVERTERS, "true");
} else {
System.setProperty(AbstractCamelContextFactoryBean.LAZY_LOAD_TYPE_CONVERTERS, "false");
}
applicationContext = createApplicationContext();
assertNotNull("Should have created a valid spring context", applicationContext);
super.setUp();
}