in camel-k-core/support/src/main/java/org/apache/camel/k/listener/SourcesConfigurer.java [52:83]
protected void accept(Runtime runtime) {
//
// load routes from env var for backward compatibility
//
String routes = System.getProperty(Constants.PROPERTY_CAMEL_K_ROUTES);
if (ObjectHelper.isEmpty(routes)) {
routes = System.getenv(Constants.ENV_CAMEL_K_ROUTES);
}
if (ObjectHelper.isNotEmpty(routes)) {
SourcesSupport.loadSources(runtime, routes.split(","));
}
//
// load routes from properties
//
// In order not to load any unwanted property, the filer remove any
// property that can't be bound to this configurer.
//
PropertiesSupport.bindProperties(
runtime.getCamelContext(),
this,
k -> k.startsWith(CAMEL_K_SOURCES_PREFIX),
CAMEL_K_PREFIX);
checkUniqueErrorHandler();
sortSources();
if (ObjectHelper.isNotEmpty(this.getSources())) {
SourcesSupport.loadSources(runtime, this.getSources());
}
}