Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Unknown
Description
Lets make this code a bit easier, and have a nicer API on the PropertiesComponent we have in camel-api now for Camel 3
// build key with default value included as this is supported during resolving String key = pi.value(); if (!isEmpty(pi.defaultValue())) { key = key + ":" + pi.defaultValue(); } // need to force property lookup by having key enclosed in tokens key = camelContext.getPropertiesComponent().getPrefixToken() + key + camelContext.getPropertiesComponent().getSuffixToken(); try { Object value = camelContext.resolvePropertyPlaceholders(key); parameters[i] = camelContext.getTypeConverter().convertTo(type, value); } catch (Exception e) { throw RuntimeCamelException.wrapRuntimeCamelException(e); }
Attachments
Issue Links
- relates to
-
CAMEL-13283 Add @BindRegistry annotation to allow binding a field/class/bean to the Camel registry
- Resolved