Advanced Camel article (#905)
* - changed test package name from org.baeldung to com.baeldung - streams are added where neccessary - format fixes * Adding Java config for Content Based File Router * Adding Java config for Content Based File Router
This commit is contained in:
committed by
Grzegorz Piwowarek
parent
42067af3e7
commit
acdea70d4c
+26
@@ -0,0 +1,26 @@
|
||||
package com.baeldung.camel.file.cfg;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.camel.builder.RouteBuilder;
|
||||
import org.apache.camel.spring.javaconfig.CamelConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import com.baeldung.camel.file.ContentBasedFileRouter;
|
||||
|
||||
@Configuration
|
||||
public class ContentBasedFileRouterConfig extends CamelConfiguration {
|
||||
|
||||
@Bean
|
||||
ContentBasedFileRouter getContentBasedFileRouter() {
|
||||
return new ContentBasedFileRouter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RouteBuilder> routes() {
|
||||
return Arrays.asList(getContentBasedFileRouter());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user