package com.bytesw.bytebot.config;

import com.bytesw.bytebot.routes.SFTPRoute;
import lombok.extern.log4j.Log4j2;
import org.apache.camel.CamelContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Configuration
@Log4j2
public class CamelConfig {

    @Autowired
    private CamelContext camelContext;

    @Autowired
    private SFTPRoute sftpRoute;

    @PostConstruct
    public void addBuilder() throws Exception {
        camelContext.addRoutes(sftpRoute);
    }
}
