This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 38e8d71 [CAMEL-13349] Add bind() methods to the RouteBuilder to allow registering beans along with the routes definitions 38e8d71 is described below commit 38e8d71971cb06a0c40cadb1ad0bfff90a8e2ba5 Author: Guillaume Nodet <gno...@gmail.com> AuthorDate: Wed Mar 20 10:31:14 2019 +0100 [CAMEL-13349] Add bind() methods to the RouteBuilder to allow registering beans along with the routes definitions --- .../src/main/java/org/apache/camel/builder/RouteBuilder.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java b/core/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java index 37e1d75..33b6b68 100644 --- a/core/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java +++ b/core/camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java @@ -113,6 +113,17 @@ public abstract class RouteBuilder extends BuilderSupport implements RoutesBuild } /** + * Binds the bean to the repository (if possible). + * + * @param id the id of the bean + * @param type the type of the bean to associate the binding + * @param bean the bean + */ + public void bindToRegistry(String id, Class<?> type, Object bean) { + getContext().getRegistry().bind(id, type, bean); + } + + /** * Configures the REST services * * @return the builder