# Setting Up

## Base POM

```markup
<parent>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-parent</artifactId>
   <version>1.4.6.RELEASE</version>
   <relativePath />
</parent>
```

## Starters

These dependencies are used to set up the application automatically.

For example this prepares a MVC project:

```markup
<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-web</artifactId>
</dependency>
```

While this adds and allows running an embedded Tomcat:

```markup
<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
```

## Configuration Class

The SpringBootApplication annotation combines several configuration annotations.

```java
@SpringBootApplication
public class Application
```

For a web application:

```java
@SpringBootApplication
public class ServletApplication extends SpringBootServletInitializer
```

This should be a runnable class, meaning it requires the run method:

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


---

# Agent Instructions: 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:

```
GET https://bernardo.gitbook.io/development-docs-java/spring-boot/setting-up.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
