liveBook · Manning

Taco Cloud

As explained in Spring in Action, Sixth Edition

A sample online Spring application for ordering tacos created in this book.

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

How Spring in Action, Sixth Edition covers it

How deep it goes
Works through the initial structure, bootstrap, baseline test, and local run; defers detailed configuration properties and Tomcat setup.
Examples
Uses a generated project tree, bootstrap class, application-context test, Maven wrapper commands, and a home page at localhost:8080.
What it assumes
Introduces project creation through Spring Tool Suite and supplies Maven wrapper scripts, so a separate Maven installation is unnecessary.
What you can do after
Operate/configure it with Spring Tool Suite or the Maven wrapper, and verify that the starter application runs locally.
How it connects
Connects Spring Initializr, Maven, Spring Boot, Thymeleaf, the application context, and embedded Tomcat.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring in Action, Sixth Edition. The section links point to the parts of the book it draws on.