Base Facts : Apache Camel 2.20.1 (Spring Boot)
Multiple context reference in same spring boot config xml throws below highlighted error, despite providing explicit different ids
When my own example failed - I tried with simple sample case.. but met with the same error
Error creating bean with name 'typeConverter' defined in class path resource >[org/apache/camel/spring/boot/TypeConversionConfiguration.class]: Unsatisfied >dependency expressed through method 'typeConverter' parameter 0; nested >exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: >No qualifying bean of type 'org.apache.camel.CamelContext' available: expected >single matching bean but found 2: camel1,camel2
<!-- here we have the 1st CamelContext -->
<camelContext id="camel1" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="direct:one" />
<to uri="mock:result" />
</route>
</camelContext>
<!-- and there we have the 2nd CamelContext -->
<camelContext id="camel2" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="direct:two" />
<to uri="log:two" />
<to uri="mock:result" />
</route>
</camelContext>
My context are being called from Spring boot starter class as follows.
@SpringBootApplication
@ComponentScan(basePackages="com.wm")
@ImportResource("classpath:META-INF/spring/spring-context.xml")
public class ExtAuthServiceAppStarter {
public static void main(String[] args) {
SpringApplication.run(ExtAuthServiceAppStarter.class, args);
}
}
Any suggestions ?