万本电子书0元读

万本电子书0元读

顶部广告

Spring Boot 2.0 Cookbook - Second Edition电子书

售       价:¥

45人正在读 | 0人评论 6.2

作       者:Alex Antonov

出  版  社:Packt Publishing

出版时间:2018-02-26

字       数:45.3万

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

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

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Take your application development skills to the next level by implementing Spring Boot features effectively About This Book ? This collection of effective recipes serves as guidelines for Spring Boot application development ? Get up to date with features of the latest version of Spring Boot 2.0 ? Tips and tricks to improve your efficiency through the stages of software development Who This Book Is For This book is for Java Developers who have good knowledge and understanding of Spring and Java application development. What You Will Learn ? Get to know Spring Boot Starters and create custom auto-configurations ? Work with custom annotations that enable bean activation ? Use DevTools to easily develop and debug applications ? Learn the effective testing techniques by integrating Cucumber and Spock ? Observe an eternal application configuration using Consul ? Move your existing Spring Boot applications to the cloud ? Use Hashicorp Consul and Netflix Eureka for dynamic Service Discovery ? Understand the various mechanisms that Spring Boot provides to examine an application’s health In Detail The Spring framework provides great flexibility for Java development, which also results in tedious configuration work. Spring Boot addresses the configuration difficulties of Spring and makes it easy to create standalone, production-grade Spring-based applications. This practical guide makes the existing development process more efficient. Spring Boot Cookbook 2.0 Second Edition smartly combines all the skills and expertise to efficiently develop, test, deploy, and monitor applications using Spring Boot on premise and in the cloud. We start with an overview of the important Spring Boot features you will learn to create a web application for a RESTful service. Learn to fine-tune the behavior of a web application by learning about custom routes and asset paths and how to modify routing patterns. Address the requirements of a complex enterprise application and cover the creation of custom Spring Boot starters. This book also includes examples of the new and improved facilities available to create various kinds of tests introduced in Spring Boot 1.4 and 2.0, and gain insights into Spring Boot DevTools. Explore the basics of Spring Boot Cloud modules and various Cloud starters to make applications in “Cloud Native” and take advantage of Service Discovery and Circuit Breakers. Style and approach This practical guide follows a recipe-based approach and provides extremely helpful guidelines to build, configure, and customize your Spring Boot applications.
目录展开

Title Page

Second Edition

Copyright

Learning Spring Boot 2.0

Second Edition

Credits

Foreword

About the Author

About the Reviewer

www.PacktPub.com

Why subscribe?

Customer Feedback

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

Quick Start with Java

Getting started

Spring Boot starters

Running a Spring Boot application

Delving into Spring Boot's property support

Bundling up the application as a runnable JAR file

Deploying to Cloud Foundry

Adding production-ready support

Pinging our app for general health

Metrics

Summary

Reactive Web with Spring Boot

Creating a reactive web application with Spring Initializr

Learning the tenets of reactive programming

Introducing Reactor types

Switching from Embedded Netty to Apache Tomcat

Comparing reactive Spring WebFlux against classic Spring MVC

Why is Spring doing this?

Showing some Mono/Flux-based endpoints

Creating a reactive ImageService

Creating a reactive file controller

Why use reactive programming?

Interacting with a Thymeleaf template

Illustrating how going from async to sync can be easy, but the opposite is not

Summary

Reactive Data Access with Spring Boot

Getting underway with a reactive data store

Solving a problem

Wiring up Spring Data repositories with Spring Boot

Creating a reactive repository

Pulling data through a Mono/Flux and chain of operations

Creating custom finders

Querying by example

Querying with MongoOperations

Logging reactive operations

Summary

Testing with Spring Boot

Test dependencies

Unit testing

Slice-based testing

Testing with embedded MongoDB

Testing with a real MongoDB database

Testing WebFlux controllers

Fully embedded Spring Boot app tests

Testing your custom Spring Boot autoconfiguration

Summary

Developer Tools for Spring Boot Apps

Using Spring Boot's DevTools for hot code reloading

Using Spring Boot's autoconfiguration report

Making local changes and seeing them on the target system

Writing a custom health check

Adding build data to /application/info

Creating custom metrics

Working with additional Actuator endpoints

Summary

AMQP Messaging with Spring Boot

Getting started with RabbitMQ

Installing RabbitMQ broker

Launching the RabbitMQ broker

Adding messaging as a new component to an existing application

Creating a message producer/message consumer

Displaying comments

Producing comments

AMQP fundamentals

Adding customized metrics to track message flow

Peeking at Spring Cloud Stream (with RabbitMQ)

Introduction to Spring Cloud

Logging with Spring Cloud Stream

Summary

Microservices with Spring Boot

A quick primer on microservices

Dynamically registering and finding services with Eureka

Introducing @SpringCloudApplication

Calling one microservice from another with client-side load balancing

Implementing microservice circuit breakers

Monitoring circuits

Offloading microservice settings to a configuration server

Summary

WebSockets with Spring Boot

Publishing saved comments to a chat service

Creating a chat service to handle WebSocket traffic

Brokering WebSocket messages

Broadcasting saved comments

Configuring WebSocket handlers

Consuming WebSocket messages from the web page

Moving to a fully asynchronous web client

Handling AJAX calls on the server

Introducing user chatting

Sending user-specific messages

Registering users without authentication

Linking a user to a session

Sending user-to-user messages

Checking out the final product

JSR 356 versus Spring WebFlux messaging

Summary

Securing Your App with Spring Boot

Securing a Spring Boot application

Using Spring Session

Creating a Gateway API

Securing the chat microservice

Authentication versus authorization

Sharing session details with other microservices

Securing the images microservice

Wiring in image ownership

Authorizing methods

Tailoring the UI with authorization checks

Securing WebSockets

Tracing calls

Securing the Config Server

Securing the Eureka Server

Summary

Taking Your App to Production with Spring Boot

Profile-based sets of beans

Creating configuration property beans

Overriding property settings in production

@ConfigurationProperties versus @Value

Pushing app to Cloud Foundry and adjusting the settings

Summary

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部