Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我在我的 web 应用程序(spring)中使用队列,我可以这样做:
while(..) { }
要响应添加到队列中的新项目,还是必须是在服务器上运行的单独服务?
即这不能在 Web 应用程序中持续正确吗?
您可能希望您的 Web 应用程序使用计时器来定期唤醒和轮询服务器(例如,如果请求是从浏览器发出的,则使用 AJAX 请求)。