use of org.apache.camel.language.jxpath.JXPathLanguage in project camel by apache.
the class JXPathLanguageAutoConfiguration method configureJXPathLanguage.
@Bean(name = "jxpath-language")
@Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JXPathLanguage.class)
public JXPathLanguage configureJXPathLanguage(CamelContext camelContext, JXPathLanguageConfiguration configuration) throws Exception {
JXPathLanguage language = new JXPathLanguage();
if (CamelContextAware.class.isAssignableFrom(JXPathLanguage.class)) {
CamelContextAware contextAware = CamelContextAware.class.cast(language);
if (contextAware != null) {
contextAware.setCamelContext(camelContext);
}
}
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null, false);
IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), language, parameters);
return language;
}
Aggregations