Spring Webflux 服务器发送事件 Thymeleaf

Spring Webflux Server Sent Events Thymeleaf

我有一个可以为学生注册的科目列表。一个主题有 属性 maxParticipants示例:
主题:西班牙语
参加人数上限: 5

我想以给定的时间间隔 Spring Flux 更新可用主题位置。这没问题(我每隔 10 秒在数据源上执行一次 select count 以获取可用位置)。

我的问题是: 我如何更新使用 thymeleaf 呈现的前端?
有许多使用 thymeleaf 和 spring webflux 的示例,但所有示例都在处理一个大型列表,其中 @Controller Model 设置为某种 thymeleaf 类型。

我只想更新现有记录。
我需要用普通的 javascript/jquery 来做这个吗?
感谢您的提示!
托马斯

您应该在网页中使用EventSource。跟随例子

https://www.mkyong.com/spring-boot/spring-boot-webflux-server-sent-events-example/