Spring: Microservices with Spring Boot
eBook - ePub

Spring: Microservices with Spring Boot

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Spring: Microservices with Spring Boot

Book details
Book preview
Table of contents
Citations

About This Book

Unlock the power of Spring Boot to build and deploy production-ready microservicesAbout 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 bookWho This Book Is ForThis 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 toolsIn DetailMicroservices 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 approachThis 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

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Spring: Microservices with Spring Boot by Ranga Rao Karanam in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Science General. We have over one million books available in our catalogue for you to explore.

Information

Year
2018
ISBN
9781789137897
Edition
1

Spring: Microservices with Spring Boot


Spring: Microservices with Spring Boot

Copyright Š 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: March 2018
Production reference: 1090318
Published by Packt Publishing Ltd.
Livery Place, 35 Livery Street
Birmingham B3 2PB, UK.
ISBN: 978-1-78913-258-8
www.packtpub.com

Credits

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

Meet Your Expert

We have the best work of the following esteemed author to ensure that your learning journey is smooth:
Ranga Rao Karanam is a programmer, trainer, and architect. His areas of interest include cloud native applications, microservices, evolutionary design, high-quality code, DevOps, BDD, TDD, and refactoring. He loves consulting for startups on developing scalable, component-based cloud native applications, and following modern development practices such as BDD, continuous delivery, and DevOps. He loves the freedom the Spring Framework brings to developing enterprise Java applications. Ranga started in28minutes with the vision of creating high-quality courses on developing cloud native Java applications. He is looking forward to enhancing his already considerable success--75,000 students on Udemy and 35,000 subscribers on YouTube.

Preface

Nowadays developers are facing competitive pressures and it impacts the way they build applications, which includes faster delivery, scalability, and high performance. Microservices helps in decomposing applications into small services and move away from a single monolithic artifact. In that case, we can build systems that are scalable, flexible, and high resilient. Spring Boot helps in building such REST-oriented, production-grade microservices.
So, if you want to build microservices with Spring Boot, you are in the right path.

What's in It for Me?

Maps are vital for your journey, especially when you're holidaying in another continent. When it comes to learning, a roadmap helps you in giving a definitive path for progressing towards the goal. So, here you're presented with a roadmap before you begin your journey.
This book is meticulously designed and developed in order to empower you with all the right and relevant information on Spring Boot. We've created this Learning Path for you that consists of three lessons:
Lesson 1, Building Microservices with Spring Boot, covers the basics of Spring Boot and REST services. You will explore different features of Spring Boot and create a few REST services with great tests.
Lesson 2, Extending Microservices, covers how to add features such as exception handling, caching, and internationalization to your application. You will learn the best practices of documenting REST services using Swagger. You will look at the basics of securing your microservices with Spring Security.
Lesson 3, Advanced Spring Boot Features, takes a look at the advanced features in Spring Boot. You will learn how to monitor a microservice with a Spring Boot Actuator. You will then learn how to deploy the microservice to Cloud. You will also learn how to develop more effectively with the developer tools provided by Spring Boot.

What Will I Get from This Book?

  • 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

Prerequisites

This book is aimed at Java developers who knows the basics of Spring programming and want to build microservices with Spring Boot. Some of the prerequisites that is required before you begin this book are:
  • Working knowledge on Java
  • Basic knowledge on Spring programming

Chapter 1. Building Microservices with Spring Boot

As we discussed in the last lesson, we are moving toward architectures with smaller, independently deployable microservices. This would mean that there will be a huge number of smaller microservices developed.
An important consequence is that we would need to be able to quickly get off the ground and get running with new components.
Spring Boot aims to solve the problem of getting off fast with a new component. In this lesson, we will start with understanding the capabilities Spring Boot brings to the table. We will answer the following questions:
  • Why Spring Boot?
  • What are the features that Spring Boot provides?
  • What is auto-configuration?
  • What is Spring Boot not?
  • What happens in the background when you use Spring Boot?
  • How do you use Spring Initializr to create new Spring Boot projects?
  • How do you create basic RESTful services with Spring Boot?

What is Spring Boot?

First of all, let's start with clearing out a few misconceptions about Spring Boot:
  • Spring Boot is not a code generation framework. It does not generate any code.
  • Spring Boot is neither an application server, nor is it a web server. It provides good integration with different ranges of applications and web servers.
  • Spring Boot does not implement any specific frameworks or specifications.
These questions still remain:
  • What is Spring Boot?
  • Why has it become so popular in the last couple of years?
To answer these questions, let's build a quick example. Let's consider an example application that you want to quickly prototype.

Building a Quick Prototype for a Microservice

Let's say we want to build a microservice with Spring MVC and use JPA (with Hibernate as th...

Table of contents

  1. Spring: Microservices with Spring Boot