22问答网
所有问题
gauss数据库中数据改变,怎么通知springboot项目
如题所述
举报该问题
其他回答
第1个回答 2022-04-13
使用mysql_udf_http(根据mysql表自动触发发送http请求通知后端。
后端使用websocket通知s前端进行数据更新。具体步骤
1.在数据库中创建一个副表来标记是否为新的报修信息。
2.spring后端采用TaskScheduler轮询数据库。
3.如有新的报修信息插入则通过websocket来通知web管理端(一个或多个都可以实时接收)
4.前端采用websocket来实时接收。
相似回答
大家正在搜
springboot两个数据库
springboot内置数据库
springboot查询数据库
springboot多数据库配置
springboot连不上数据库
springboot数据库连接池
springboot配置双数据库
springboot 数据库假面
Springboot连接数据库