# 文档服务 API 中没有 findPage()

> Source: https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/no-find-page-in-document-service

🌐 No `findPage()` in Document Service API

Strapi 5 用 Document Service API 替代了 Entity Service API，后者不包含 `findPage()`。请改用 Document Service API 的 `findMany()` 方法。

🌐 Strapi 5 replaces the Entity Service API with the Document Service API, which does not include `findPage()`. Use the Document Service API's `findMany()` method instead.

在 Strapi 5 中，[文档服务 API](/cms/api/document-service) 取代了实体服务 API。文档服务 API 中没有 `findPage()` 方法，用户应使用 `findMany()` 方法代替。

🌐 In Strapi 5, the [Document Service API](/cms/api/document-service) replaces the Entity Service API. There is no `findPage()` method available in the Document Service API and users should use the `findMany()` method instead.

此页面是[重大更改数据库](/cms/migration/v4-to-v5/breaking-changes)的一部分，提供关于重大更改的信息以及从 Strapi v4 迁移到 Strapi 5 的附加说明。

🌐 This page is part of the [breaking changes database](/cms/migration/v4-to-v5/breaking-changes) and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

- Is this breaking change affecting plugins? Yes
- Is this breaking change automatically handled by a codemod? No

## 重大变更描述 {#breaking-change-description}

🌐 Breaking change description

**在 Strapi v4 中**

在 Strapi v4 中，你可以使用实体服务 API 的 `findPage()` 方法，例如如下所示： 

🌐 In Strapi v4 you could use the `findPage()` method from the Entity Service API, for instance as follows: 

```jsx
strapi.entityService.findPage('api::article.article', {
  start: 10,
  limit: 15,
});
```

**在 Strapi 5 中**

在 Strapi 5 中，实体服务 API 已被弃用，你应该改用文档服务 API。[`findMany()` 方法](/cms/api/document-service/sort-pagination#pagination) 可以按如下方式使用：

🌐 In Strapi 5 the Entity Service API is deprecated and you should use the Document Service API instead. The [`findMany()` method](/cms/api/document-service/sort-pagination#pagination) can be used as follows:

```jsx
strapi.documents("api::article.article").findMany({
  limit: 10,
  start: 0,
});
```

## 迁移 {#migration}

🌐 Migration

本节重新组合了有关引入的重大更改的有用说明和程序。

🌐 This section regroups useful notes and procedures about the introduced breaking change.

### 手动迁移 {#manual-migration}

🌐 Manual migration

在你的自定义代码中，将实体服务 API 的 `findPage()` 方法的所有出现替换为文档服务 API 的 `findMany()` 方法。

🌐 In your custom code, replace any occurences of the Entity Service API's `findPage()` method by the `findMany()` method from the Document Service API.
