Taco Cloud is a sample Spring Boot application for ordering tacos. It begins as a generated project, then grows into a web application. Its initial structure gives you a place for Java code, tests, browser assets, templates, and configuration. section 1.2.2 section 1.2.1
The starter project has a few useful landmarks:
- TacoCloudApplication.java starts the Spring Boot application; TacoCloudApplicationTests.java checks that the application context loads. section 1.2.2
- pom.xml defines the Maven build, while mvnw and mvnw.cmd let you build without installing Maven separately. section 1.2.2
- application.properties holds configuration; static holds browser assets; templates holds files used to render pages, including a planned Thymeleaf template. section 1.2.2
Run the first version
Start Taco Cloud from the Spring Boot Dashboard, then open http://localhost:8080 to see its home page. A startup log reporting Tomcat on port 8080 means it is ready. You did not deploy to a separate Tomcat server: Tomcat is part of the application. From a terminal, the Maven wrapper also offers ./mvnw spring-boot:run. section 1.3.4 section 1.2.2
Listing 1.2 The Taco Cloud bootstrap class
package tacos;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication #1
public class TacoCloudApplication {
public static void main(String[] args) {
SpringApplication.run(TacoCloudApplication.class, args); #2
}
}
The bootstrap class shows the small starting point: @SpringBootApplication marks the class, and its main method calls SpringApplication.run. section 1.2.2
