| == XML and Java Bean |
| |
| A basic example shows how Camel JBang can invoke Java beans from XML routes. |
| |
| Notice how the Java bean is annotated with `@BindToRegisty` that allows Camel |
| to refer to this bean by an id from the XML routes. |
| |
| The runtime is still plain Camel Main with JBang, and not Spring Boot or Quarkus. |
| However the benefit of allowing to use their annotations is that the transition |
| from Camel JBang to Spring Boot or Quarkus is easier. |
| |
| |
| === Install JBang |
| |
| First install JBang according to https://www.jbang.dev |
| |
| When JBang is installed then you should be able to run from a shell: |
| |
| [source,sh] |
| ---- |
| $ jbang --version |
| ---- |
| |
| This will output the version of JBang. |
| |
| To run this example you can either install Camel on JBang via: |
| |
| [source,sh] |
| ---- |
| $ jbang app install camel@apache/camel |
| ---- |
| |
| Which allows to run CamelJBang with `camel` as shown below. |
| |
| === How to run |
| |
| Then you can run this example using: |
| |
| [source,sh] |
| ---- |
| $ camel run * |
| ---- |
| |
| === Live reload |
| |
| You can run the example in dev mode which allows you to edit the example, |
| and hot-reload when the file is saved. |
| |
| [source,sh] |
| ---- |
| $ camel run * --dev |
| ---- |
| |
| |
| === Help and contributions |
| |
| If you hit any problem using Camel or have some feedback, then please |
| https://camel.apache.org/community/support/[let us know]. |
| |
| We also love contributors, so |
| https://camel.apache.org/community/contributing/[get involved] :-) |
| |
| The Camel riders! |