엔터프라이즈 솔루션

Apache Camel note

Terry Cho 2013. 2. 12. 19:10

1. 프로젝트 생성하기

mvn archetype:create -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-java -DarchetypeVersion=2.5.0 -DgroupId=camelinaction -DartifactId=order-router


으로  Camel Project 생성

2. 코드 
아래는 Spring을 이용하여, FTP로 파일을 읽어서 Local의 C:\temp에 복사하는 코드

public class MyRouteBuilder extends RouteBuilder {

    /**
     * A main() so we can easily run these routing rules in our IDE
     */
    public static void main(String... args) throws Exception {
        Main.main(args);
    }

    /**
     * Lets configure the Camel routing rules using Java code...
     */
    public void configure() {
        from("ftp://userid@168.1.2.3/camel/src/?password=password&stepwise=false")
        .to("file:c:/temp/");

    }
}


그리드형

'엔터프라이즈 솔루션' 카테고리의 다른 글

아키텍쳐에 있어서 레퍼런스의 중요성  (2) 2009.10.20
2009년 기술 전망  (2) 2009.01.06