Hamcrest Integration

MockMvc 提供了一个 API 来使用构建器风格的方法构建请求,可以使用静态导入来启动该构建器。Hamcrest 用于定义期望,并为常见需求提供了许多开箱即用的选项。

Plain MockMvc provides an API to build the request using a builder-style approach that can be initiated with static imports. Hamcrest is used to define expectations and it provides many out-of-the-box options for common needs.