Unlock the power of Spring Boot to build and deploy production-ready microservices
About This Book
- Get to know the advanced features of Spring Boot in order to develop and monitor applications
- Use Spring cloud to deploy and manage microservices on the cloud
- Look at embedded servers and deploy a test application to a PaaS Cloud platform
- Embedded with assessments that will help you revise the concepts you have learned in this book
Who This Book Is For
This book is aimed at Java developers who knows the basics of Spring programming and want to build microservices with Spring Boot.
What You Will Learn
- Use Spring Initializr to create a basic spring project
- Build a basic microservice with Spring Boot
- Implement caching and exception handling
- Secure your microservice with Spring security and OAuth2
- Deploy microservices using self-contained HTTP server
- Monitor your microservices with Spring Boot actuator
- Learn to develop more effectively with developer tools
Microservices helps in decomposing applications into small services and move away from a single monolithic artifact. It helps in building systems that are scalable, flexible, and high resilient. Spring Boot helps in building REST-oriented, production-grade microservices.
This book is a quick learning guide on how to build, monitor, and deploy microservices with Spring Boot. You'll be first familiarized with Spring Boot before delving into building microservices. You will learn how to document your microservice with the help of Spring REST docs and Swagger documentation. You will then learn how to secure your microservice with Spring Security and OAuth2. You will deploy your app using a self-contained HTTP server and also learn to monitor a microservice with the help of Spring Boot actuator.
This book is ideal for Java developers who knows the basics of Spring programming and want to build microservices with Spring Boot.
This book is embedded with useful assessments that will help you revise the concepts you have learned in this book.
Style and approach
This book follows a practical approach to teach you how to build, monitor, and deploy microservices with Spring Boot.
Note: This book is a blend of text and quizzes, all packaged up keeping your journey in mind. It includes content from the following Packt product:
- Mastering Spring 5.0 by Ranga Rao Karanam
Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.
Table of Contents
Spring: Microservices with Spring Boot
- Spring: Microservices with Spring Boot
1. Building Microservices with Spring Boot
- What is Spring Boot?
Spring Boot Hello World
- Configure spring-boot-starter-parent
- Configure pom.xml with the Required Starter Projects
- Configuring spring-boot-maven-plugin
- Creating Your First Spring Boot Launch Class
- Running Our Hello World Application
- Starter Projects
- What is REST?
- First REST Service
Creating a Todo Resource
- Request Methods, Operations, and Uris
- Beans and Services
- Retrieving a Todo List
- Retrieving Details for a Specific Todo
- Adding A Todo
- Spring Initializr
- A Quick Peek into Auto-Configuration
2. Extending Microservices
- Exception Handling
- Documenting REST Services
Securing REST Services with Spring Security
- Adding Spring Security Starter
- Basic Authentication
- OAuth 2 Authentication
- Executing OAuth Requests
3. Advanced Spring Boot Features
- Customizing Frameworks Through application.properties
- Custom Properties in Application.Properties
- Other Options for Application Configuration Values
- YAML Configuration
- Embedded Servers
- Developer Tools
- Spring Boot Actuator
- Deploying an Application to Cloud
- Externalised Configuration
- 4. Assessment Answers
- Title: Spring: Microservices with Spring Boot
- Release date: March 2018
- Publisher(s): Packt Publishing
- ISBN: 9781789132588