# 客户端响应

## 注解使用

注解在Controller的类上，所有mapping方法的返回值都会被包装在`JsonResponse`的`data`字段。

注解在Controller的mapping方法上，仅该方法的返回值会被包装。

### 示例

* 使用

```java
@RestController
@RequestMapping("user")
@JsonBody
public class UserController extends AbstractRestController<UserEntity, Long, UserQuery, UserRequest, UserResponse> {
    //...
}
```

* 返回值

```json
{
  "code": "0",
  "message": "ok",
  "data": {}
}
```


---

# 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://query.docs.doyto.win/zh/web/jsonbody.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.
