本文整理匯總了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();
}