使用 Java 功能 API 与 Spring 云数据流和轮询消费者

Using Java functional API with Spring Cloud Data Flow and Polled Consumers

我正在从事一个试图使用轮询消费者 API 的项目。但是,existing documentation, blog posts and sample code seems to use deprecated annotations (such as org.springframework.cloud.stream.annotation.Input). This seems to be because they are relying on the older style of Spring Cloud stream applications rather than using Java functional api (e.g., java.util.function.Function), as shown in other examples such as this one,在同一个 repo 中给出。

有没有一种方法可以在 Spring Cloud Stream 中对投票的消费者使用功能样式?

您使用的是过时的文档。最新版本可从项目站点获得 - https://spring.io/projects/spring-cloud-stream#learn.

您要查找的部分是 - https://docs.spring.io/spring-cloud-stream/docs/3.1.5/reference/html/spring-cloud-stream.html#spring-cloud-streams-overview-using-polled-consumers