万本电子书0元读

万本电子书0元读

顶部广告

Spring: Microservices with Spring Boot电子书

售       价:¥

12人正在读 | 0人评论 6.2

作       者:Ranga Rao Karanam

出  版  社:Packt Publishing

出版时间:2018-03-14

字       数:142.8万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
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 In Detail 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
目录展开

Spring: Microservices with Spring Boot

Credits

Meet Your Expert

Preface

What's in It for Me?

What Will I Get from This Book?

Prerequisites

Chapter 1. Building Microservices with Spring Boot

What is Spring Boot?

Building a Quick Prototype for a Microservice

Primary Goals

Nonfunctional Features

Spring Boot Hello World

Configure spring-boot-starter-parent

Note

spring-boot-starter-parent

Configure pom.xml with the Required Starter Projects

Understanding Starter Projects

Configuring spring-boot-maven-plugin

Creating Your First Spring Boot Launch Class

The SpringApplication Class

The @SpringBootApplication Annotation

Running Our Hello World Application

Auto-configuration

Starter Projects

What is REST?

First REST Service

Simple Method Returning String

Unit Testing

Integration Testing

Simple REST Method Returning an Object

Executing a Request

Unit Testing

Integration Testing

Get Method with Path Variables

Executing a Request

Unit Testing

Integration Testing

Creating a Todo Resource

Request Methods, Operations, and Uris

Beans and Services

Retrieving a Todo List

Executing the Service

Unit Testing

Integration Testing

Retrieving Details for a Specific Todo

Executing the Service

Unit Testing

Integration Testing

Adding A Todo

Postman

Executing the POST Service

Unit Testing

Integration Testing

Spring Initializr

Creating Your First Spring Initializr Project

pom.xml

FirstSpringInitializrApplication.java Class

FirstSpringInitializrApplicationTests Class

A Quick Peek into Auto-Configuration

Summary

Assessments

Chapter 2. Extending Microservices

Exception Handling

Spring Boot Default Exception Handling

Non-Existent Resource

Resource Throwing an Exception

Throwing a Custom Exception

Customizing the Exception Message

Response Status

HATEOAS

Sending HATEOAS Links in Response

Spring Boot Starter HATEOAS

Note

Validation

Enabling Validation on the Controller Method

Defining validations on the Bean

Unit Testing Validations

Documenting REST Services

Generating a Swagger Specification

Swagger UI

Customizing Swagger Documentation Using Annotations

Securing REST Services with Spring Security

Adding Spring Security Starter

Basic Authentication

Integration Testing

Unit Testing

OAuth 2 Authentication

High-level flow

Implementing OAuth 2 authentication for Our Service

Setting up Authorization and Resource Servers:

Note

Executing OAuth Requests

Obtaining an Access Token

Executing the Request Using the Access Token

Integration Test

Internationalization

Caching

Spring-boot-starter-cache

Enabling Caching

Caching Data

JSR-107 Caching Annotations

Auto-Detection Order

Summary

Assessments

Chapter 3. Advanced Spring Boot Features

Externalised Configuration

Customizing Frameworks Through application.properties

Note

Logging

Embedded Server Configuration

Spring MVC

Spring Starter Security

Data Sources, JDBC, and JPA

Other Configuration Options

Custom Properties in Application.Properties

Configuration properties - Type-Safe Configuration Management

Profiles

Profiles-Based Bean Configuration

Other Options for Application Configuration Values

YAML Configuration

Embedded Servers

Switching to Jetty and Undertow

Building a WAR file

Developer Tools

Live Reload

Spring Boot Actuator

HAL Browser

Configuration Properties

Note

Environment Details

Health

Mappings

Beans

Metrics

Auto-Configuration

Debugging

Deploying an Application to Cloud

Cloud Foundry

Note

Summary

Assessments

Chapter 4. Assessment Answers

Lesson 1: Building Microservices with Spring Boot

Lesson 2: Extending Microservices

Lesson 3: Advanced Spring Boot Features

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部