【Spring】电子书 - Spring.in.Action.5th.Edition

该帖子部分内容已隐藏
付费阅读
金币 3
此内容为付费阅读,请付费后查看

书籍目录

Spring in Action

brief contents

contents

preface

acknowledgments

about this book

Who should read this book

How this book is organized: a roadmap

About the code

Book forum

Other online resources

About the author

About the cover illustration

Part 1?Foundational Spring

1 Getting started with Spring

1.1 What is Spring?

1.2 Initializing a Spring application

1.2.1 Initializing a Spring project with Spring Tool Suite

1.2.2 Examining the Spring project structure

1.3 Writing a Spring application

1.3.1 Handling web requests

1.3.2 Defining the view

1.3.3 Testing the controller

1.3.4 Building and running the application

1.3.5 Getting to know Spring Boot DevTools

1.3.6 Let?s review

1.4 Surveying the Spring landscape

1.4.1 The core Spring Framework

1.4.2 Spring Boot

1.4.3 Spring Data

1.4.4 Spring Security

1.4.5 Spring Integration and Spring Batch

1.4.6 Spring Cloud

Summary

2 Developing web applications

2.1 Displaying information

2.1.1 Establishing the domain

2.1.2 Creating a controller class

2.1.3 Designing the view

2.2 Processing form submission

2.3 Validating form input

2.3.1 Declaring validation rules

2.3.2 Performing validation at form binding

2.3.3 Displaying validation errors

2.4 Working with view controllers

2.5 Choosing a view template library

2.5.1 Caching templates

Summary

3 Working with data

3.1 Reading and writing data with JDBC

3.1.1 Adapting the domain for persistence

3.1.2 Working with JdbcTemplate

3.1.3 Defining a schema and preloading data

3.1.4 Inserting data

3.2 Persisting data with Spring Data JPA

3.2.1 Adding Spring Data JPA to the project

3.2.2 Annotating the domain as entities

3.2.3 Declaring JPA repositories

3.2.4 Customizing JPA repositories

Summary

4 Securing Spring

4.1 Enabling Spring Security

4.2 Configuring Spring Security

4.2.1 In-memory user store

4.2.2 JDBC-based user store

4.2.3 LDAP-backed user store

4.2.4 Customizing user authentication

4.3 Securing web requests

4.3.1 Securing requests

4.3.2 Creating a custom login page

4.3.3 Logging out

4.3.4 Preventing cross-site request forgery

4.4 Knowing your user

Summary

5 Working with configuration properties

5.1 Fine-tuning autoconfiguration

5.1.1 Understanding Spring?s environment abstraction

5.1.2 Configuring a data source

5.1.3 Configuring the embedded server

5.1.4 Configuring logging

5.1.5 Using special property values

5.2 Creating your own configuration properties

5.2.1 Defining configuration properties holders

5.2.2 Declaring configuration property metadata

5.3 Configuring with profiles

5.3.1 Defining profile-specific properties

5.3.2 Activating profiles

5.3.3 Conditionally creating beans with profiles

Summary

Part 2?Integrated Spring

6 C reating REST services

6.1 Writing RESTful controllers

6.1.1 Retrieving data from the server

6.1.2 Sending data to the server

6.1.3 Updating data on the server

6.1.4 Deleting data from the server

6.2 Enabling hypermedia

6.2.1 Adding hyperlinks

6.2.2 Creating resource assemblers

6.2.3 Naming embedded relationships

6.3 Enabling data-backed services

6.3.1 Adjusting resource paths and relation names

6.3.2 Paging and sorting

6.3.3 Adding custom endpoints

6.3.4 Adding custom hyperlinks to Spring Data endpoints

Summary

7 Consuming REST services

7.1 Consuming REST endpoints with RestTemplate

7.1.1 GETting resources

7.1.2 PUTting resources

7.1.3 DELETEing resources

7.1.4 POSTing resource data

7.2 Navigating REST APIs with Traverson

Summary

8 Sending messages asynchronously

8.1 Sending messages with JMS

8.1.1 Setting up JMS

8.1.2 Sending messages with JmsTemplate

8.1.3 Receiving JMS messages

8.2 Working with RabbitMQ and AMQP

8.2.1 Adding RabbitMQ to Spring

8.2.2 Sending messages with RabbitTemplate

8.2.3 Receiving message from RabbitMQ

8.3 Messaging with Kafka

8.3.1 Setting up Spring for Kafka messaging

8.3.2 Sending messages with KafkaTemplate

8.3.3 Writing Kafka listeners

Summary

9 Integrating Spring

9.1 Declaring a simple integration flow

9.1.1 Defining integration flows with XML

9.1.2 Configuring integration flows in Java

9.1.3 Using Spring Integration?s DSL configuration

9.2 Surveying the Spring Integration landscape

9.2.1 Message channels

9.2.2 Filters

9.2.3 Transformers

9.2.4 Routers

9.2.5 Splitters

9.2.6 Service activators

9.2.7 Gateways

9.2.8 Channel adapters

9.2.9 Endpoint modules

9.3 Creating an email integration flow

Summary

Part 3?Reactive Spring

10 Introducing Reactor

10.1 Understanding reactive programming

10.1.1 Defining Reactive Streams

10.2 Getting started with Reactor

10.2.1 Diagramming reactive flows

10.2.2 Adding Reactor dependencies

10.3 Applying common reactive operations

10.3.1 Creating reactive types

10.3.2 Combining reactive types

10.3.3 Transforming and filtering reactive streams

10.3.4 Performing logic operations on reactive types

Summary

11 Developing reactive APIs

11.1 Working with Spring WebFlux

11.1.1 Introducing Spring WebFlux

11.1.2 Writing reactive controllers

11.2 Defining functional request handlers

11.3 Testing reactive controllers

11.3.1 Testing GET requests

11.3.2 Testing POST requests

11.3.3 Testing with a live server

11.4 Consuming REST APIs reactively

11.4.1 GETting resources

11.4.2 Sending resources

11.4.3 Deleting resources

11.4.4 Handling errors

11.4.5 Exchanging requests

11.5 Securing reactive web APIs

11.5.1 Configuring reactive web security

11.5.2 Configuring a reactive user details service

Summary

12 Persisting data reactively

12.1 Understanding Spring Data?s reactive story

12.1.1 Spring Data reactive distilled

12.1.2 Converting between reactive and non-reactive types

12.1.3 Developing reactive repositories

12.2 Working with reactive Cassandra repositories

12.2.1 Enabling Spring Data Cassandra

12.2.2 Understanding Cassandra data modeling

12.2.3 Mapping domain types for Cassandra persistence

12.2.4 Writing reactive Cassandra repositories

12.3 Writing reactive MongoDB repositories

12.3.1 Enabling Spring Data MongoDB

12.3.2 Mapping domain types to documents

12.3.3 Writing reactive MongoDB repository interfaces

Summary

Part 4?Cloud-native Spring

13 Discovering services

13.1 Thinking in microservices

13.2 Setting up a service registry

13.2.1 Configuring Eureka

13.2.2 Scaling Eureka

13.3 Registering and discovering services

13.3.1 Configuring Eureka client properties

13.3.2 Consuming services

Summary

14 Managing configuration

14.1 Sharing configuration

14.2 Running Config Server

14.2.1 Enabling Config Server

14.2.2 Populating the configuration repository

14.3 Consuming shared configuration

14.4 Serving application- and profile-specific properties

14.4.1 Serving application-specific properties

14.4.2 Serving properties from profiles

14.5 Keeping configuration properties secret

14.5.1 Encrypting properties in Git

14.5.2 Storing secrets in Vault

14.6 Refreshing configuration properties on the fly

14.6.1 Manually refreshing configuration properties

14.6.2 Automatically refreshing configuration properties

Summary

15 Handling failure and latency

15.1 Understanding circuit breakers

15.2 Declaring circuit breakers

15.2.1 Mitigating latency

15.2.2 Managing circuit breaker thresholds

15.3 Monitoring failures

15.3.1 Introducing the Hystrix dashboard

15.3.2 Understanding Hystrix thread pools

15.4 Aggregating multiple Hystrix streams

Summary

Part 5?Deployed Spring

16 Working with Spring Boot Actuator

16.1 Introducing Actuator

16.1.1 Configuring Actuator?s base path

16.1.2 Enabling and disabling Actuator endpoints

16.2 Consuming Actuator endpoints

16.2.1 Fetching essential application information

16.2.2 Viewing configuration details

16.2.3 Viewing application activity

16.2.4 Tapping runtime metrics

16.3 Customizing Actuator

16.3.1 Contributing information to the /info endpoint

16.3.2 Defining custom health indicators

16.3.3 Registering custom metrics

16.3.4 Creating custom endpoints

16.4 Securing Actuator

Summary

17 Administering Spring

17.1 Using the Spring Boot Admin

17.1.1 Creating an Admin server

17.1.2 Registering Admin clients

17.2 Exploring the Admin server

17.2.1 Viewing general application health and information

17.2.2 Watching key metrics

17.2.3 Examining environment properties

17.2.4 Viewing and setting logging levels

17.2.5 Monitoring threads

17.2.6 Tracing HTTP requests

17.3 Securing the Admin server

17.3.1 Enabling login in the Admin server

17.3.2 Authenticating with the Actuator

Summary

18 Monitoring Spring with JMX

18.1 Working with Actuator MBeans

18.2 Creating your own MBeans

18.3 Sending notifications

Summary

19 Deploying Spring

19.1 Weighing deployment options

19.2 Building and deploying WAR files

19.3 Pushing JAR files to Cloud Foundry

19.4 Running Spring Boot in a Docker container

19.5 The end is where we begin

Summary

Appendix?Bootstrapping Spring applications

A.1 Initializing a project with Spring Tool Suite

A.2 Initializing a project with IntelliJ IDEA

A.3 Initializing a project with NetBeans

A.4 Initializing a project at start.spring.io

A.5 Initializing a project from the command line

A.5.1 curl and the Initializr API

A.5.2 Spring Boot command-line interface

A.6 Creating Spring applications with a meta-framework

A.7 Building and running projects

index

Symbols

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Z

Spring in Action?back cover

下载地址

请登录后发表评论

    没有回复内容