# 第 1 章 Spring 入门

本章内容：

* Spring 和 Spring Boot 概述
* 初始化一个 Spring 项目
* 纵览 Spring

尽管希腊哲学家赫拉克利特（Heraclitus）并非以软件开发人员而闻名，他在这个问题上似乎掌握得很好。有人引用他的话说：“唯一不变的就是变化。” 这句话体现了软件开发的实质。

当 Rod Johnson 在&#x4E66;*《Expert One-on-One J2EE Design and Development》*（Wrox，2002，<http://mng.bz/oVjy>）中介绍了 Spring 框架的最初形式后，我们今天开发应用程序的方式与一年前、五年前、十年前，甚至15年前都不一样了。

当时，开发的最常见的应用程序类型是基于浏览器的 web 应用程序，由关系数据库支持。虽然这种类型的开发仍然是相关的，而且 Spring 已经为这种类型的应用程序做好了很好的准备，但是我们现在还对开发由面向云的微服务组成的应用程序感兴趣，这些服务将数据持久化到各种数据库中。而对响应式编程的新兴趣在于通过非阻塞操作提供更大的可伸缩性和更好的性能。

随着软件开发的发展，Spring 框架也发生了变化，以解决现代开发问题，包括微服务和响应式编程。Spring 还通过引入 Spring Boot 来简化自己的开发模型。

无论您是开发简单的数据库支持的 web 应用程序，还是构建基于微服务的现代应用程序，Spring 都是帮助您实现目标的框架。本章是您使用 Spring 进行现代应用程序开发的第一步。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://potoyang.gitbook.io/spring-in-action-v5/di-1-zhang-spring-ru-men.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
