Spring in Action, Sixth Edition

克雷格·沃斯Posts & Telecom Press2022

Rating 5.0
Chapters
23
ISBN
9787115598691

Tags

Computing Programming Enterprise DevelopmentMicroservicesProgramming Design编程Study GuideField CasesPopular NarrativeBeginner Friendly

Summary

Spring in Action, Sixth Edition is the Chinese translation of the sixth edition of the classic Spring guide Spring in Action, written by Craig Walls, a member of the Pivotal (now VMware) Spring team, and translated by Zhang Weibin and Wu Guohao. The book has 4 parts and 18 chapters, built around a single project that grows step by step: it begins with initializing an application with Spring Boot, writing controllers and views, and validating forms, then introduces relational and non-relational persistence options such as JdbcTemplate, Spring Data JPA, Cassandra, and MongoDB, before using Spring Security for authentication and authorization. Part 2 turns to integration, including building REST services with Spring MVC, securing REST endpoints, sending asynchronous messages via JMS, RabbitMQ, and Kafka, and connecting to external systems with Spring Integration and Spring Cloud capabilities. Part 3 focuses on reactive Spring: the Reactor programming model, developing reactive APIs with Spring WebFlux, reactive persistence with R2DBC, and the RSocket protocol. Part 4 is aimed at production, covering Spring Boot Actuator monitoring endpoints, observing application state through management endpoints and JMX, and deploying to traditional servers and containers (including Kubernetes). The English original corresponds to the Spring 5.3 and Spring Boot 2.4 technology stack. The book is driven by runnable examples, with the emphasis on helping readers understand Spring's dependency injection and auto-configuration ideas by doing.

Editor's review

市面上的 Spring 书大致分两类:一类把文档重新排列一遍,一类真的带你写代码。克雷格·沃斯这本属于后者,从 2004 年第一版起就是公认的入门标准,第六版依旧保持了“边做边讲”的节奏:你会从一个 Taco 点单小应用起步,一路把它改造成带数据库、带鉴权、能对外发消息、还能部署上云的项目。相比旧版,本书新增了反应式编程整整四章(Reactor、WebFlux、R2DBC、RSocket),并覆盖 Spring Boot Actuator 与 Kubernetes 部署,正好补上现代 Spring 开发者最容易卡住的两块:异步非阻塞和云原生运维。中文版译笔通顺,代码保留原文,术语对得上官方文档,读英文资料时不会出现概念断层。它不是一本可以躺着读完的书,而是一本必须坐在电脑前跟着敲的书——对认真想搞懂 Spring 的人,这正是它最大的价值。

Who it's for

A good fit for

Not a good fit for

Reading tips

  1. 务必边读边敲:每章代码都建立在前一章项目上,跳读会失去主线。
  2. 先通读第 1 部分打牢 DI、自动配置、数据访问的地基,再按兴趣选修第 2、3、4 部分。
  3. 读反应式章节时先补一点 Reactor 基础,否则 Publisher/Mono/Flux 的调试会很难受。
  4. 遇到版本差异,用作者在 GitHub 上公开的配套源码对照运行,比逐行改旧代码省时。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Part 1 Foundations of Spring
  2. Chapter 1 Getting Started with Spring
  3. Chapter 2 Developing Web Applications
  4. Chapter 3 Working with Data
  5. Chapter 4 Working with Non-Relational Data
  6. Chapter 5 Securing Spring
  7. Chapter 6 Working with Configuration Properties
  8. Part 2 Integrating Spring
  9. Chapter 7 Creating REST Services
  10. Chapter 8 Securing REST
  11. Chapter 9 Sending Asynchronous Messages
  12. Chapter 10 Integrating Spring
  13. Part 3 Reactive Spring
  14. Chapter 11 Understanding Reactive Programming
  15. Chapter 12 Developing Reactive APIs
  16. Chapter 13 Persisting Data Reactively
  17. Chapter 14 Working with RSocket
  18. Part 4 Deploying Spring
  19. Chapter 15 Working with Spring Boot Actuator
  20. Chapter 16 Administering Spring
  21. Chapter 17 Monitoring Spring with JMX
  22. Chapter 18 Deploying Spring
  23. Appendix Initializing Spring Applications

FAQ

这本书和《Spring Boot实战》是同一本吗? 不是。《Spring实战》原名 Spring in Action,作者是克雷格·沃斯;沃斯的另一本书是《Spring Boot实战》(Spring Boot in Action)。两书内容有重叠,但《Spring实战》覆盖面更广,包含数据、集成、安全、反应式与部署。
第6版对应哪个 Spring 版本? 英文原版针对 Spring 5.3 与 Spring Boot 2.4 更新,中文版据此翻译。如果你想学 Spring 6、Spring Boot 3 的新特性(如 GraalVM 原生镜像、Jakarta EE 命名空间),需要额外查阅官方文档。
没有 Spring 基础,直接读第6版可以吗? 可以,但需要具备 Java 与基本 Web 开发常识(HTTP、MVC、SQL)。本书第 1 部分即从 Spring 起步讲起,作者不预设你用过旧版 Spring,只要跟着敲示例就能上手。
书里的示例项目是什么?需要自己准备数据库吗? 主线是一个 Taco 点单应用,随章节逐步加上 Web 层、持久层与安全配置。早期章节可用内嵌 H2 数据库直接运行,后面涉及 Cassandra、MongoDB、Kafka 等组件时,建议用 Docker 起依赖服务。

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

克雷格·沃斯 Author

Craig Walls is the author of Spring in Action, Sixth Edition. Publicly available information about his nationality, dates of birth and death, educational background, and professional career is limited; what can be confirmed is that he takes part in spreading computer knowledge through technical writing. Judging from the work held in the collection, his subject area falls under general computing, with a specific focus on the practical application of the Spring framework. Positioned as a hands-on guide, the book typically centers on real development scenarios, emphasizing workable examples and step-by-step explanation rather than abstract theory. This writing style suits readers who want to turn framework knowledge into practical skills, and gives his work reference value for learners of the relevant technology. Overall, his writing is practice-oriented and clearly organized, serving developers' practical needs in understanding and using Spring.