Appendix. Spring Boot microservices

 

Throughout the book, we’ve focused on developing microservices for Enterprise Java with Thorntail. This appendix provides details on developing microservices with Spring Boot. Included are snippets from Spring Boot in Action by Craig Walls (Manning, 2015). If you’re particularly focused on Spring Boot microservices, taking a look at this book for further details would be worthwhile (see www.manning.com/books/spring-boot-in-action).

Anatomy of a Spring Boot project

This section contains snippets from section 2.1.1 of Spring Boot in Action, outlining the parts of a Spring Boot application and its requirements.

Examining a newly initialized Spring Boot project

Figure 1 illustrates the structure of a Spring Boot reading-list project.

Figure 1. Structure of reading-list project

The first thing to notice is that the project structure follows the layout of a typical Maven or Gradle project. The main application code is placed in the src/main/java branch of the directory tree, resources are placed in the src/main/resources branch, and test code is placed in the src/test/java branch. At this point, you don’t have any test resources, but if you did, you’d put them in src/test/resources.

Digging deeper, you’ll see a handful of files sprinkled about the project:

Spring Boot starter dependencies

 
 
 

Developing a Spring Boot application

 
 
 

Spring Boot testing

 
 

Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest