Spring Boot-无限循环服务 [英] Spring Boot - infinite loop service

查看:314
本文介绍了Spring Boot-无限循环服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想构建一个无头的应用程序,该应用程序将无限循环地查询数据库并在某些条件下执行某些操作(例如,提取具有特定值的记录,并在找到每条消息的启动电子邮件发送过程时进行操作.)

I want to build a headless application which will query the DB in infinite loop and perform some operations in certain conditions (e.g. fetch records with specific values and when found launch e-mail sending procedure for each message).

我想使用Spring Boot作为基础(特别是因为Actuator允许公开运行状况检查),但是现在我使用Spring Boot来构建REST Web服务.

I want to use Spring Boot as a base (especially because of Actuator to allow expose health-checks), but for now I used Spring Boot for building REST web-services.

构建无限循环应用程序时,有什么最佳实践或模式可遵循?是否有人试图基于Spring Boot构建它,并且可以与我分享他在这种情况下的体系结构?

Is there any best practices or patterns to follow when building infinite loop applications ? Does anyone tried to build it based on Spring Boot and can share with me his architecture for this case ?

最诚挚的问候.

推荐答案

我正在使用的是消息代理和放置在Spring Boot应用程序上的使用者来完成这项工作.

What I'm using is a message broker and a consumer put at the spring boot application to do the job.

这篇关于Spring Boot-无限循环服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆