Webflux PostgreSQL [英] Webflux postgresql
问题描述
我应该如何在Webflux中实现postgresql?
我想使用 ReactiveCrudRepository
来实现它,但是JPA不起作用...我想要存储用户以及SSH公钥和私钥。我已经读过MongoDB事务不如postgresql可靠(如果我错了,请纠正我)。那就是为什么我要使用postgresql。
How should I implement postgresql in Webflux?
I would like to do it with ReactiveCrudRepository
, but JPA isn't reactive... I want to store users and SSH public and private keys. I've read that MongoDB transactions aren't as reliable as postgresql(Correct me if I am wrong). Thats why I want to use postgresql.
但是在webflux中使用Postgresql的最佳方法是什么?我想使用JPA存储库(或其他),而不编写完整的查询,但仍然能够进行反应式编程。
But what is the best way to use Postgresql in webflux? I would like to use JPA repositories(or other) and not write full queries, but still be able to program reactively.
推荐答案
仍然没有Pg的官方驱动程序。
我并没有真正使用它,但是可以尝试在此github 链接。
Still no official driver for Pg. I didn't really use it but here is a try at this github link.
看看 Redis 作为mongodb的替代方案:它可以同时存在于内存db和普通数据源中。
Take a look at Redis as an alternative to mongodb: It can be both in memory db and ordinary datasource.
希望是有帮助的:)
这篇关于Webflux PostgreSQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!