Introduction

This course’s approach differs from that of other programming courses and books that you may have encountered. I believe that the best way to learn a new framework or language is to build applications using it. I also assume that you have some experience with Java, Maven, and the IDE of your choice.

The application for the course is modeled after a real production application serving thousands of requests and running smoothly since its first deployment. The sample application follows the same implementation approach but leaves out certain complexities which are not needed for learning to build a microservice with Spring Boot.

The original application stores binary files and certain metadata, like product references, width, and height of images, file size, for covers and other marketing materials of books. The application is integrated into a large infrastructure and offers all of its services GUI-less. However, for the sample application, we will do something simpler for learning and are going to develop a commenting system.

What will the application do:

  • store comments for products or pages
  • check comments for spam and flag them accordingly
  • provide a restful interface to add, delete and retrieve the comments

What we will build in this course:

  • a simple SpamDetector for learning to use Spring Core
  • a persistence tier using Spring Data JPA
  • a service Layer using our previously build storage and integrating our SpamDetector module for spam detection
  • a RESTful API using Spring MVC

We will test our microservice, make it production-ready with Spring Boots’ features, and finally deploy it as a standalone microservice.

The full source code of the sample application is available on GitHub: Link

The project uses a Multi Module Maven layout. Build and run instructions are in the repository.

I also added all external references to a private resource page for your convenience.

If you have any questions, use the comment function on a lecture or mail me at [email protected].

What You Will Need

  • Java 8+
  • Maven (3.2+) or optionally Gradle (see note below)
  • IDE or Texteditor of your choice

Installing and setting them up is not in the scope of this course.

You can use Gradle instead of Maven, but the course and the examples assume you are using Maven. However, I assume you are capable of converting it to Gradle yourself.

If you are new to Maven, check out the brief introduction to Maven in Appendix A. It will assist you in following along.

Complete and Continue