32,39 €
Unlock the power of Spring Boot to build and deploy production-ready microservices
Key Features 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 bookBook Description
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.
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 toolsWho 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.
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.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 107
Veröffentlichungsjahr: 2018
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
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:
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.
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.
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.
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:
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:
First of all, let's start with clearing out a few misconceptions about Spring Boot:
These questions still remain:
To answer these questions, let's build a quick example. Let's consider an example application that you want to quickly prototype.
Let's say we want to build a microservice with Spring MVC and use JPA (with Hibernate as the implementation) to connect to the database.
Let's consider the steps in setting up such an application:
At least a few of the steps mentioned have to be completed before we can start with building our business logic. And this might take a few weeks at the least.
When we build microservices, we would want to make a quick start. All the preceding steps will not make it easy to develop a microservice. And that's the problem Spring Boot aims to solve.
The following quote is an extract from the Spring Boot website (http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-documentation):
Spring Boot makes it easy to create stand-alone, production-grade Spring based applications that you can "just run". We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration
Spring Boot enables developers to focus on the business logic behind their microservice. It aims to take care of all the nitty-gritty technical details involved in developing microservices.
The primary goals of Spring Boot are as follows:
A few of the nonfunctional features provided by Spring Boot are as follows:
We will start with building our first Spring Boot application in this lesson. We will use Maven to manage dependencies.
The following steps are involved in starting up with a Spring Boot application:
Let's start with step 1, configuring the starter projects.
Let's start with a simple pom.xml file with spring-boot-starter-parent:
The first question is this: why do we need spring-boot-starter-parent?
A spring-boot-starter-parent dependency contains the default versions of Java to use, the default versions of dependencies that Spring Boot uses, and the default configuration of the Maven plugins.
The spring-boot-starter-parent dependency is the parent POM providing dependency and plugin management for Spring Boot-based applications.
Let's look at some of the code inside spring-boot-starter-parent
