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

# Spring Boot

> Learn how to create your first task using Java and Spring Boot

<Snippet file="quickstart/1_define_task.mdx" />

```java Application.java
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @RestController
    public class TaskController {
        @PostMapping("/api/tasks")
        public ResponseEntity<String> performTask(@RequestBody String body) {
            System.out.println("Performing task: " + body);
            return new ResponseEntity<>("", HttpStatus.OK);
        }
    }
}
```

<Snippet file="callout_params_api_reference.mdx" />

<Snippet file="quickstart/2_get_handler_url.mdx" />

<Snippet file="quickstart/3_create_first_task.mdx" />

<Snippet file="quickstart/4_next_steps.mdx" />

<AccordionGroup>
  <Snippet file="quickstart/accordion_use_cron_dashboard.mdx" />

  <Snippet file="quickstart/accordion_create_task_java.mdx" />
</AccordionGroup>

<Snippet file="learn_more.mdx" />
