Register the bean using the spring-boot way using @Bean or @Component etc

On Fri, Apr 8, 2016 at 4:42 PM, kumar5 <deelip.kum...@gmail.com> wrote:
> i am using camel-2.16.2 , spring boot  and java DSL.   As document says if
> spring then use ApplicationContextRegistry but ApplicationContextRegistry
> doesn't have any method to added  registry.
> i want to register  bean in Java DSL. please any one help me on this.
>
> @Bean
>      RouteBuilder createRouteBuilder() {
>         return new RouteBuilder() {
>             @Override
>                 public void configure() {
>                 CamelContext context = getContext();
>                 PropertyPlaceholderDelegateRegistry registry =
> (PropertyPlaceholderDelegateRegistry)context.getRegistry();
>                 ApplicationContextRegistry aRegistry =
> (ApplicationContextRegistry) registry.getRegistry();
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-2-16-2-spring-and-java-DSL-register-tp5780772.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to