This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 02e56ce29e0cdc6c4cb328f33ab9d9f7f9e56d09 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri May 26 15:14:58 2023 +0200 CAMEL-19393: Allow to specify if a value should be converter to a specific type when using property binding. This is needed with camel-kafka and other vendor integrations such as MS Azure. --- docs/user-manual/modules/ROOT/pages/property-binding.adoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/user-manual/modules/ROOT/pages/property-binding.adoc b/docs/user-manual/modules/ROOT/pages/property-binding.adoc index 586c9ca4b8e..267e87a3fae 100644 --- a/docs/user-manual/modules/ROOT/pages/property-binding.adoc +++ b/docs/user-manual/modules/ROOT/pages/property-binding.adoc @@ -28,6 +28,8 @@ The `PropertyBindingSupport` class supports binding String valued properties to `#class:com.foo.MyClassType#myFactoryMethod('Hello World', 5, true)`. Or if you need to create the instance via constructor parameters then you can specify the parameters as shown: `#class:com.foo.MyClass('Hello World', 5, true)`. +- _valueAs(type):value_ - To declare that the value should be converted to the given type, such as `#valueAs(int):123` + which indicates that the value 123 should be converted to an integer. - _ignore case_ - Whether to ignore case for property keys (will ignore by default) == Property binding basics @@ -43,7 +45,7 @@ For example to set brokers on the Kafka component you can do: camel.component.kafka.brokers = mykafka1,mykafka2 ---- -This will essentially be equivavlent to configuring Kafka component in regular Java code via setters: +This will essentially be equivalent to configuring Kafka component in regular Java code via setters: [source,java] ---- @@ -190,7 +192,7 @@ PropertyBindingSupport.build().withCamelContext(context).withTarget(foo) == More details -Property binding is noteably used when running Camel in standalone mode with Camel Main, or using Camel Spring Boot, Camel K, +Property binding is notably used when running Camel in standalone mode with Camel Main, or using Camel Spring Boot, Camel K, Camel Kafka Connector, or Camel Quarkus. All these runtimes have a similar way of configuring via property bindings such as from `application.properties` files.