Spring Boot in Action cover

Spring Boot in Action

Rating 4.0
Chapters
40
Series
Turing Programming Series · Java Series
ISBN
9787115433145

Tags

Summary

This book is the Chinese translation of Spring Boot in Action, written by Craig Walls, author of the bestselling Spring in Action and a senior engineer at Pivotal, and translated by Ding Xuefeng, an experienced translator in the Spring field. Published by Posts & Telecom Press in September 2016 as part of the Turing Programming Series · Java, it centers on Spring application development and revolves around Spring Boot's four core features: auto-configuration, starter dependencies, the command-line interface (CLI), and Actuator. It begins with the evolution of Spring, explaining what problems Spring Boot solves and does not solve, then uses Spring Initializr and the CLI to quickly build a first project. Next it covers organizing dependencies by function with starters, reducing boilerplate with auto-configuration, and overriding default behavior through property files, profiles, and custom configuration. It also discusses testing Spring Boot applications (auto-configured integration tests, mocking Spring MVC, web security testing, Selenium testing of a running application, and more), Groovy and CLI development, integration with Grails 3, Actuator endpoints, the remote shell, JMX monitoring, and endpoint customization, as well as deployment paths such as packaging as a WAR for an application server and pushing to Cloud Foundry and Heroku. Four quick-reference appendices cover developer tools, starter dependencies, configuration properties, and dependency versions. With 8 chapters and 4 appendices, concise in length and dense with examples, it serves as an entry-to-intermediate reader for the Spring Boot 1.x era.

Editor's review

这本《Spring Boot实战》贵在“轻而准”。作者克雷格·沃斯是《Spring实战》的作者、Pivotal 高级工程师,写惯教材的人来写入门书,最大的好处是知道初学者的痛点在哪里:他不急着堆 API,而是先花一章讲清楚“Spring Boot 是什么、不是什么”,把自动配置这层窗纸提前捅破,后面再看代码就不会一头雾水。 全书不到 210 页,节奏干净:起步依赖、自动配置、外置配置、测试、CLI 与 Groovy、Grails 集成、Actuator、部署,八个章节基本覆盖了 Spring Boot 1.x 的全部主干。中文版由丁雪丰翻译,术语处理规范,“掀开自动配置的神秘面纱”这类标题也能看出译笔的用心。附录里的起步依赖表、配置属性表、依赖版本表尤其实用,日常开发中可以当手册翻。 需要提醒的是,原书基于 Spring Boot 1.3 写作,书中不少配置写法和依赖坐标在今天看来已经过时。它更适合作为理解 Spring Boot 设计思路的“原理读本”,而不是照着敲代码的“版本手册”。想要直接上手新版本,建议配合官方文档一起读。

Who it's for

A good fit for

  • 已掌握 Java 基础语法,准备转向 Spring Boot 开发的后端新手
  • 用过 Spring 但对自动配置、起步依赖一知半解,想系统理解的开发者
  • 希望用最短时间摸清 Spring Boot 全貌、并了解 Actuator 运维手段的工程师
  • 需要在团队内做技术分享或新人培训,想要一本脉络清晰教材的技术负责人

Not a good fit for

  • 完全没有 Java 和 Spring 基础的读者,读起来会缺少前置概念铺垫
  • 需要用 Spring Boot 2.x/3.x 及现代微服务、响应式技术栈的读者,书中内容已明显滞后
  • Python、前端等非 Java 技术栈的开发者,收益有限

Reading tips

  1. 先通读第1、2章建立“自动配置+起步依赖”的整体认知,再按需跳读后面的专题章节。
  2. 第3、4、7章建议边读边动手,把书中的示例改成自己项目中的场景,理解会更牢。
  3. 附录B、C、D当速查表用,不必通读,遇到依赖冲突或配置疑问时再翻。
  4. 读完后再对照 Spring Boot 官方文档,补上书中缺失的新版本特性,避免沿用旧写法。

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. Chapter 1 Getting Started
  2. 1.1 Spring Rises Again
  3. 1.1.1 Rediscovering Spring
  4. 1.1.2 The Essentials of Spring Boot
  5. 1.1.3 What Spring Boot Is Not
  6. 1.2 Getting Started with Spring Boot
  7. 1.2.1 Installing the Spring Boot CLI
  8. 1.2.2 Initializing a Spring Boot Project with Spring Initializr
  9. 1.3 Summary
  10. Chapter 2 Developing Your First Application
  11. 2.1 Using Spring Boot
  12. 2.1.1 Exploring the Newly Initialized Spring Boot Project
  13. 2.1.2 Anatomy of the Spring Boot Build Process
  14. 2.2 Using Starter Dependencies
  15. 2.2.1 Specifying Feature-Based Dependencies
  16. 2.2.2 Overriding Transitive Dependencies Brought In by Starters
  17. 2.3 Using Auto-Configuration
  18. 2.3.1 Focusing on Application Features
  19. 2.3.2 Running the Application
  20. 2.3.3 What Just Happened
  21. 2.4 Summary
  22. Chapter 3 Customizing Configuration
  23. 3.1 Overriding Spring Boot Auto-Configuration
  24. 3.1.1 Securing the Application
  25. 3.1.2 Creating a Custom Security Configuration
  26. 3.1.3 Lifting the Veil on Auto-Configuration
  27. 3.2 Externalizing Configuration with Property Files
  28. 3.2.1 Fine-Tuning Auto-Configuration
  29. 3.2.2 Externalizing Configuration of Application Beans
  30. 3.2.3 Configuring with Profiles
  31. 3.3 Customizing the Application Error Page
  32. 3.4 Summary
  33. Chapter 4 Testing
  34. 4.1 Auto-Configuration for Integration Testing
  35. 4.2 Testing Web Applications
  36. 4.2.1 Mocking Spring MVC
  37. 4.2.2 Testing Web Security
  38. 4.3 Testing a Running Application
  39. 4.3.1 Starting the Server on a Random Port
  40. 4.3.2 Testing HTML Pages with Selenium

FAQ

这本书对应 Spring Boot 的哪个版本?
原书《Spring Boot in Action》基于 Spring Boot 1.3 写作,中文版 2016 年出版。书中配置写法、依赖坐标与端点路径与 2.x、3.x 差异较大,学习时需以官方文档为准做版本校正。
没学过 Spring 框架能直接读吗?
可以读,但会比较吃力。书中默认读者熟悉 Java 注解、依赖注入与 MVC 的基本概念,第3章“覆盖自动配置”等内容也需要 Spring 基础才能理解透彻。
书中的示例代码能直接运行吗?
按现有环境多数不能原样跑通。旧版依赖可能拉取失败或与当前 JDK 不兼容,建议先按书中思路改写,再选用当前的 Spring Boot 版本实践。
为什么翻译版页数比英文原版多?
不同渠道统计口径不同:国家出版发行信息平台与豆瓣书目登记为 209 页,早期宣传资料曾写 224 页,实际以所购版本版权页为准。
这本书适合用来准备面试吗?
适合补充框架原理层面的理解,比如自动配置如何生效、Actuator 能做什么。但涉及新版本特性、微服务与云原生的面试题,需要另外补充材料。

Comments

Find this book

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

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.

More by the same author

Top rated in the same category