RestDocumentation class 已弃用,我应该改用什么?

RestDocumentation class is deprecated, what should I use instead?

The documentation for org.springframework.restdocs.RestDocumentation 表示已弃用。

我正尝试在这样的 JUnit 测试中使用 class:

@Rule
public RestDocumentation restDocumentation = new RestDocumentation("target/generated-snippets");

我应该使用什么class?

尝试JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation("target/generated-snippets")