Introduction

REST 网页服务已经成为 Web 上应用程序集成的一大主要工具。REST 的核心定义了一个系统,该系统包含了与客户端交互的资源。这些资源以超媒体驱动的方式实现。 Spring MVCSpring WebFlux均提供了构建此类服务的坚实基础。但是,即便针对多域对象系统为 REST 网页服务实施极其简单的信条也会非常繁琐,并且会导致大量样板代码。

REST web services have become the number one means for application integration on the web. In its core, REST defines that a system that consists of resources with which clients interact. These resources are implemented in a hypermedia-driven way. Spring MVC and Spring WebFlux each offer a solid foundation to build theses kinds of services. However, implementing even the simplest tenet of REST web services for a multi-domain object system can be quite tedious and result in a lot of boilerplate code.

Spring Data REST 建立在 Spring Data 存储库之上,并自动将这些存储库导出为 REST 资源。它利用超媒体让客户端自动查找由存储库公开的功能,并将这些资源集成到基于相关超媒体功能中。

Spring Data REST builds on top of the Spring Data repositories and automatically exports those as REST resources. It leverages hypermedia to let clients automatically find functionality exposed by the repositories and integrate these resources into related hypermedia-based functionality.