I have a spring boot application to which I am adding a camel route. The class where the route is defined extends FatJarRouter and is annotated with @Component. When the application is run as spring boot application, the route doesn't get identified. But if i write the route in the main class with @SpringBootApplication annotation the route is identified. This is how it shows in logs as of now:
o.a.camel.spring.SpringCamelContext : Total 0 routes, of which 0 are started. o.a.camel.spring.SpringCamelContext : Apache Camel 2.17.2 (CamelContext: camel-4) started in 0.026 seconds
The method with route is also annotated with override as:
@Override
public void configure() throws Exception{
from("file:\\input").to("file:\\output");
}
Please tell me how can I identify the route while writing it as a separate class but not in the main class. Is there anything missing.