I am working on a legacy app which is using Apache Camel with SFTP endpoints. The Camel context is defined using Spring Xml Dsl e.g.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
<camel:camelContext id="myCtx" errorHandlerRef="eventDLQ"
xmlns="http://camel.apache.org/schema/spring"
autoStartup="true">
<camel:endpoint id="sftp1" uri="sftp://ftp1@example"/>
<camel:endpoint id="sftp2" uri="sftp://ftp2@example"/>
</camel:camelContext>
</beans>
I need to configure Camel SFTP using the SFTPConfiguration object but don't know how to wire it up as I am using Spring.
Can I just create the bean in the XML file using Spring and will Camel auto-detect it?