Getting Started with Spring Framework (3rd Edition)

J. Sharma / Ashish SarinPosts & Telecom Press2018

No rating yet
Word count
834K words
Chapters
18
ISBN
9787115482372

Tags

Computing Software Tutorials Publishing HouseProgramming DesignDesign ThinkingStudy GuideIndiaBeginner GuideBeginnersFramework Basics

Summary

This book is an introductory guide to the Spring framework for beginners, co-authored by J. Sharma and Ashish Sarin of India, translated by Zhou Mi, and published in Chinese as a third edition by Posts & Telecom Press in 2018; the original English book is Getting Started with Spring Framework. Aimed at "making it easier for readers to learn to use Spring," it begins with the framework's positioning, module composition, and IoC container, then unfolds around Spring 4.3 and Java 8: container basics and interface-oriented design, creating beans through static and instance factory methods, constructor and setter dependency injection, bean scopes and inheritance, the p/c namespaces and util schema, the FactoryBean interface, and other bean configuration details; it then covers custom initialization and destruction logic for beans and ways of interacting with the container in BeanPostProcessor and BeanFactoryPostProcessor. The latter half turns to engineering practice, including annotation-driven development centered on @Component, @Autowired, and @Qualifier, Java-class-based container configuration, Spring's support for database interaction and Spring Data, messaging, email sending, asynchronous method execution and caching, aspect-oriented programming, and Spring Web MVC's controllers, validation and data binding, RESTful service development, internationalization, file upload, and asynchronous request handling, closing with protecting applications with Spring Security. The appendices give instructions for installing MongoDB and importing and deploying the sample project, so readers can work hands-on as they read.

Editor's review

很多 Spring 书要么一上来就讲源码、要么假定读者已经熟悉 Web 开发,这本《Spring学习指南》走的却是另一条路:它假设你会写 Java,但不熟悉 Spring,于是从“Spring 到底解决什么问题”讲起,一个概念配一段可运行的小例子,把 IoC、依赖注入、bean 生命周期这些容易含糊的地方拆成独立小节反复演示。第 3 版相较前版针对 Spring 4.3 做了更新,并补入基于 Java 类的容器配置与 Spring Data 两章,这恰好是当下项目里最常见的写法,读完之后再看企业代码不会觉得陌生。全书覆盖范围相当完整:容器配置、注解驱动、AOP、数据库、消息、缓存、Spring MVC 与 REST、Spring Security 都有专章,可以当作一条完整的入门路线来走;附录还手把手教你安装 MongoDB、导入示例工程,省去初学者最耗时的环境折腾。需要说明的是,它定位是“入门”,源码级原理讲解不多,也不涉及 Spring Boot 自动配置的内部机制,因此更适合作为第一本 Spring 书,而不是最后一本。

Who it's for

A good fit for

Not a good fit for

Reading tips

  1. 先通读第 1、2 章建立容器与依赖注入的整体图景,不要急于跳到 Web 部分。
  2. 第 3 至 5 章建议对照附录 B 导入示例工程,边改代码边验证 bean 配置的效果。
  3. 读 Spring MVC 四章时,把 RESTful 服务那一章当作小项目目标,串联前面所学。
  4. 书中示例基于 Spring 4.3,动手时注意核对所用依赖版本,避免因版本差异出现配置问题。

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 Introduction to the Spring Framework
  2. Chapter 2 Spring Framework Basics
  3. Chapter 3 Bean Configuration
  4. Chapter 4 Dependency Injection
  5. Chapter 5 Custom Beans and Bean Definitions
  6. Chapter 6 Annotation-Driven Development with Spring
  7. Chapter 7 Java-Based Container Configuration
  8. Chapter 8 Database Interaction with Spring
  9. Chapter 9 Spring Data
  10. Chapter 10 Messaging, Email, Asynchronous Method Execution, and Caching with Spring
  11. Chapter 11 Aspect-Oriented Programming
  12. Chapter 12 Spring Web MVC Basics
  13. Chapter 13 Validation and Data Binding in Spring Web MVC
  14. Chapter 14 Developing RESTful Web Services with Spring Web MVC
  15. Chapter 15 Advanced Spring Web MVC—Internationalization, File Upload, and Asynchronous Request Handling
  16. Chapter 16 Securing Applications with Spring Security
  17. Appendix A Downloading and Installing the MongoDB Database
  18. Appendix B Importing and Deploying the Sample Project in Eclipse IDE (or IntelliJ IDEA)

FAQ

这本书适合零基础学 Java 的人吗? 不太适合。书中默认读者已掌握 Java 语法与面向对象基础,讲解直接进入 Spring 容器、依赖注入等内容,若连类和接口的用法都不熟,建议先补 Java 基础再读。
第 3 版和第 2 版有什么差别? 据出版社与图书信息,第 3 版针对 Spring 4.3 做了更新,并新增了基于 Java 的容器配置和 Spring Data 相关章节,取代了部分早期 XML 配置为主的写法。
书中内容是 XML 配置还是注解配置? 两者都有。前半部分用不少篇幅讲 XML 中的 bean 定义、依赖注入与命名空间配置,第 6、7 章则系统介绍注解驱动开发和基于 Java 类的配置,符合从传统写法向现代写法的过渡。
这本书讲 Spring Boot 吗? 不专门讲。全书主体围绕 Spring Framework 本身展开,只在介绍“构建在 Spring 之上的框架”时提及相关生态,想系统学 Spring Boot 需另找专门书籍。
书中的示例代码能直接运行吗? 示例为书中讲解服务,篇幅有限,需要配合附录 B 的说明在 Eclipse 或 IntelliJ IDEA 中导入部署;同时示例基于 Spring 4.3 与 Java 8,较新环境下可能需自行调整依赖版本。

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

J. Sharma Author

J. Sharma is a computer technology author about whom limited public information is available; details such as nationality and dates of birth and death are not specified in the existing materials. Judging from the works held in the collection, his writing centers mainly on the Spring framework, with the third and fourth editions of Spring Learning Guide, three works in total, all cataloged under computing, programming design, and software learning. These books are aimed at readers seeking a systematic grasp of Spring development, focusing on the framework's core concepts and practical application while following technological updates through successive editions. Overall, Sharma is a practical author known for Spring technical tutorials, whose works offer readers fairly focused introductory and进阶 reference in the relevant learning field.

Ashish Sarin Author

Ashish Sarin is an author of computer technology books, though public information about his nationality, dates of birth and death, and other personal background remains very limited. Judging from the works included in the library, he focuses mainly on writing study guides for the Spring framework. Three Chinese-language works are currently listed, including the third and fourth editions of Spring Learning Guide. These books fall under the categories of computing, programming design, and software learning, and are aimed at readers who wish to systematically master Spring development, with content emphasizing framework fundamentals, core concepts, and practical application. In terms of writing style, his works are primarily tutorial-based and stress step-by-step progression, making them suitable as introductory and intermediate references. Because verifiable information about the author is scarce, little can be said about his life or other areas of writing; readers may chiefly rely on the above works to understand his approach to technical writing.