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 FriendlySummary
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
- 有 Java 基础、想系统学习 Spring 与 Spring Boot 的后端开发者
- 正在把旧 SSH/SSM 项目迁移到 Spring Boot 的在职工程师
- 需要了解 WebFlux、R2DBC 等反应式技术栈的中高级开发
- 准备面试、需要把 Spring 核心机制与常用组件串起来复习的求职者
Not a good fit for
- 完全没有 Java 语法基础的读者,读起来会很吃力
- 只想查单个注解用法、不需要系统学习的速查型用户
- 需要最新 Spring Boot 3.x 与 Spring 6 内容的读者(本书对应 5.3/2.4 技术栈)
Reading tips
- 务必边读边敲:每章代码都建立在前一章项目上,跳读会失去主线。
- 先通读第 1 部分打牢 DI、自动配置、数据访问的地基,再按兴趣选修第 2、3、4 部分。
- 读反应式章节时先补一点 Reactor 基础,否则 Publisher/Mono/Flux 的调试会很难受。
- 遇到版本差异,用作者在 GitHub 上公开的配套源码对照运行,比逐行改旧代码省时。
About the publisher
Posts & Telecom Press China · Founded in 1953Posts & 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
- Part 1 Foundations of Spring
- Chapter 1 Getting Started with Spring
- Chapter 2 Developing Web Applications
- Chapter 3 Working with Data
- Chapter 4 Working with Non-Relational Data
- Chapter 5 Securing Spring
- Chapter 6 Working with Configuration Properties
- Part 2 Integrating Spring
- Chapter 7 Creating REST Services
- Chapter 8 Securing REST
- Chapter 9 Sending Asynchronous Messages
- Chapter 10 Integrating Spring
- Part 3 Reactive Spring
- Chapter 11 Understanding Reactive Programming
- Chapter 12 Developing Reactive APIs
- Chapter 13 Persisting Data Reactively
- Chapter 14 Working with RSocket
- Part 4 Deploying Spring
- Chapter 15 Working with Spring Boot Actuator
- Chapter 16 Administering Spring
- Chapter 17 Monitoring Spring with JMX
- Chapter 18 Deploying Spring
- 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
克雷格·沃斯 AuthorCraig 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.