Having class like:
@SpringBootApplication public class FileCbrRoute { // must have a main method spring-boot can run public static void main(String[] args) { SpringApplication.run(FileCbrRoute.class, args); } @Component class FileRouter extends RouteBuilder { @Override public void configure() throws Exception { // take file and route it based on filename extension to appropriate output directory from("file:{{env:JAVA_DATA_DIR}}/in?noop=true") .log("Logging headers: ${headers}") .choice() .when(header("CamelFileNameOnly").endsWith(".txt")).to("file:{{env:JAVA_DATA_DIR}}/out/txt?autoCreate=true") .when(header("CamelFileNameOnly").endsWith(".xml")).to("file:{{env:JAVA_DATA_DIR}}/out/xml?autoCreate=true"); } } }
leads to warning:
WARN o.a.c.i.DefaultCamelBeanPostProcessor - No CamelContext defined yet so cannot inject into bean: routesHealthCheckRepository'
- is related to
-
CAMEL-12087 Loading...
- links to