You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Sreekanth K R (JIRA)" <ji...@apache.org> on 2018/03/19 20:49:00 UTC

[jira] [Commented] (CAMEL-7607) Spring @Configuration based CamelContextFactoryBean not scanning

    [ https://issues.apache.org/jira/browse/CAMEL-7607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16405422#comment-16405422 ] 

Sreekanth K R commented on CAMEL-7607:
--------------------------------------

Is this issue fixed? I am still seeing that camelContextFactoryBean.setPackages("route.package") still doesn't start the routes. I am using version 2.19.3 . Any help would be highly appreciated.

> Spring @Configuration based CamelContextFactoryBean not scanning
> ----------------------------------------------------------------
>
>                 Key: CAMEL-7607
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7607
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-spring
>    Affects Versions: 2.13.2
>         Environment: SPRING_VERSION         : '4.0.5.RELEASE',
> CAMEL_JMS_VERSION          : '2.13.2',
> CAMEL_SPRING_VERSION          : '2.13.2',
> CAMEL_CORE_VERSION          : '2.13.2',
>            Reporter: Tyson Duncan
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: camel_example.tar.gz
>
>
> When using javaConfig scanning does not occur.  It appears onApplicationEvent is never invoked.
> -Spring is invoked via DispatcherServlet
> -@Configuration scan via XML
> {quote}
> @Configuration
> public class CamelConfig {
>     @Autowired
>     private ApplicationContext applicationContext;
>     @Bean
>     public CamelContext camelContext() throws Exception {
>         CamelContextFactoryBean factory = new CamelContextFactoryBean();
>         factory.setApplicationContext(applicationContext);
>         factory.setId("camel");
>         factory.setPackages(new String[]{"com.mypackage.with.routebuilders"});
>         SpringCamelContext context = factory.getContext();
>         return context;
>     }
> }
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)