> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/v.-spring-boot-actuator/50.-endpoints/50.8-implementing-custom-endpoints/50.8.3-servlet-endpoints.md).

# 50.8.3 Servlet端点

通过实现一个用`@ServletEndpoint`注解的类，`Servlet`可以暴露为一个端点。该类还实现了`Supplier<EndpointServlet>`。Servlet端点提供了与Servlet容器更深层次的集成，但是暴露了可移植性。它们用于将现有`Servlet`暴露为端点。对于新的端点，只要可能，就应该首选`@Endpoint`和`@WebEndpoint`注解。
