> For the complete documentation index, see [llms.txt](https://www.pranaypourkar.co.in/the-programmers-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pranaypourkar.co.in/the-programmers-guide/spring/utilities-and-libraries/apache-libraries/apache-camel/spring-dependency.md).

# Spring Dependency

## 1. **`camel-jsch-starter` (Spring Boot Integration for SFTP)**

```xml
<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-jsch-starter</artifactId>
    <version>x.x.x</version>
</dependency>
```

This dependency is specific to Spring Boot applications and provides automatic configuration and integration of Camel's SFTP component using the **JSCH** library. JSCH is a Java implementation of SSH2 and is used for handling **SFTP**(Secure FTP) operations.

* **Spring Boot Integration**: The `camel-jsch-starter` dependency is a **Spring Boot starter**, meaning it will automatically configure the Camel SFTP component for you when using Spring Boot. We don't need to explicitly configure beans or components since Spring Boot manages it through auto-configuration.
* **Use Case**: This is ideal if you're using Spring Boot and want to work with **SFTP** (not plain FTP) without manually configuring Camel's `SftpComponent`.
* **No version specification needed**: Because this is a Spring Boot starter, the version is controlled by the Spring Boot and Camel BOM (Bill of Materials), ensuring version compatibility automatically.

## 2. **`camel-ftp` (Camel FTP/SFTP Component)**

```xml
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-ftp</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>
```

The `camel-ftp` dependency provides both **FTP** and **SFTP** capabilities to Apache Camel by including both the **FTP** and **SFTP** components. However, this is a general dependency that we can use in any Camel project, whether or not we're using Spring Boot.

* **Manual Configuration**: Unlike the Spring Boot starter, we may need to manually configure the components in our application (especially if not using Spring Boot), though it can still work automatically with Spring Boot.
* **FTP and SFTP**: This dependency supports both **plain FTP** (File Transfer Protocol) and **SFTP** (Secure FTP) using the same library.
* **Version Control**: We need to specify the version, and it should match your Camel core version to ensure compatibility.

## 3. **`camel-ftp-starter` (Camel FTP/SFTP Spring Component)**

```markup
<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-ftp-starter</artifactId>
    <version>x.x.x</version>
</dependency>
```

The `camel-ftp-starter` is a Spring Boot starter that simplifies the integration of FTP and SFTP protocols in Spring Boot applications. It is an extension of the general `camel-ftp` component, but packaged in a way that takes advantage of Spring Boot’s auto-configuration mechanism.

* **Auto-Configuration**:
  * This starter will auto-configure the necessary components (`FtpComponent` and `SftpComponent`) for FTP and SFTP operations without requiring manual setup in your Spring Boot application.
  * As a Spring Boot starter, it simplifies the integration of FTP and SFTP by reducing the boilerplate code we would otherwise need to configure in a non-Spring Boot environment.
* **FTP and SFTP Support**:
  * Unlike `camel-jsch-starter` (which only supports SFTP), `camel-ftp-starter` provides support for both **FTP** and **SFTP** protocols.
  * It uses Apache Commons Net under the hood for FTP and JSCH for SFTP.
* **Spring Boot Features**:
  * Leverages Spring Boot’s auto-configuration capabilities, which means we don't have to manually define FTP or SFTP components unless we want custom configurations.
  * Supports the properties-based configuration of FTP and SFTP servers via the `application.properties` or `application.yml` files in a Spring Boot project.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.pranaypourkar.co.in/the-programmers-guide/spring/utilities-and-libraries/apache-libraries/apache-camel/spring-dependency.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
