> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aseeflow.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Up a Spring Boot Project

## Requirements

The project requires JDK 17 or later (see [supported environments](/introduction/supported-environments)).

## Set up a Java project

We start by setting up a Spring Boot application as an Apache Maven project in your IDE. This consists of three steps:

1. Create a new Maven project.
2. Add the ASEE Flow and Spring Boot dependencies.
3. Add a main class as an entry point for launching the Spring Boot application.

### Create a new Maven project

First, set up a new Apache Maven project named *loan-approval-spring-boot*,
using the coordinates and dependencies shown below.
You can use your IDE's *New Maven Project* wizard or create the `pom.xml` directly.

### Add ASEE Flow and Spring Boot dependencies

The next step consists of setting up the Maven dependencies for the new project. Maven dependencies need to be added to the `pom.xml` file of the project. We add the Spring Boot BOM in the *dependency management* section and the ASEE Flow Spring Boot Starter for webapps, which automatically includes the ASEE Flow engine and web applications in the app. We also use `spring-boot-maven-plugin`, which does all the magic for packaging the Spring Boot application content together.

```xml theme={null}
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.aseeflow.bpm.getstarted</groupId>
  <artifactId>loan-approval-spring-boot</artifactId>
  <version>0.0.1-SNAPSHOT</version>

  <properties>
    <aseeflow.spring-boot.version>1.0.0</aseeflow.spring-boot.version>
    <spring-boot.version>3.5.5</spring-boot.version>
    <maven.compiler.release>17</maven.compiler.release>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring-boot.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.aseeflow.bpm.springboot</groupId>
      <artifactId>aseeflow-bpm-spring-boot-starter-webapp</artifactId>
      <version>${aseeflow.spring-boot.version}</version>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
    </dependency>
    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <version>4.0.3</version>
    </dependency>
  </dependencies>

   <build>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>${spring-boot.version}</version>
        <configuration>
          <layout>ZIP</layout>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>repackage</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.11.0</version>
      </plugin>
    </plugins>
  </build>

</project>
```

### Add a main class to the Spring Boot application

Next, add an application class with a main method that will be the entry point for launching the Spring Boot application. The class has the `@SpringBootApplication` annotation, which implicitly adds several convenient features (autoconfiguration, component scan, and so on — see the Spring Boot docs). The class is added in the `src/main/java` folder in the `org.camunda.bpm.getstarted.loanapproval` package.

```java theme={null}
package org.camunda.bpm.getstarted.loanapproval;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class WebappExampleProcessApplication {
	public static void main(String... args) {
		SpringApplication.run(WebappExampleProcessApplication.class, args);
	}
}
```

### Build and run

Now you can perform the first build. Select the `pom.xml` in the Package Explorer, right-click, and select **Run As > Maven Install**.

Your first ASEE Flow Spring Boot application is ready. As a result of the build, you will have a JAR file in your `target` folder. This JAR is a Spring Boot application that embeds Tomcat as a web container, the ASEE Flow engine, and the ASEE Flow web application resources. When started, it uses an in-memory H2 database for the engine's needs.

You can run the application by right-clicking the `WebappExampleProcessApplication` class and selecting **Run As > Java Application**. Wait until you see a line like this in the console:

```
Started WebappExampleProcessApplication in 10.584 seconds
```

Then go to [http://localhost:8080/](http://localhost:8080/) in your browser and enjoy the ASEE Flow web applications.

Another way to run the app is to simply run the JAR file with a `java -jar` command.

<Note>
  **Catch up: get the sources of Step-1**

  ```bash theme={null}
  git clone https://github.com/aseeflow/aseeflow-get-started-spring-boot.git
  git checkout -f Step-1
  ```

  Or [download as a `.zip`](https://github.com/aseeflow/aseeflow-get-started-spring-boot/archive/Step-1.zip).
</Note>

## Next step

Continue to [configuration](/get-started/spring-boot/configuration).
