Spring Data R2DBC与Redshift数据库的集成



我正在尝试迁移到spring Data R2DBC,我找不到对Amazon Redshift数据库的支持,如果有支持,有人能帮我吗。

这是spring文档的url,它支持的数据库很少,但Redshift不在列表中。https://spring.io/projects/spring-data-r2dbc

我从下面的"Mark Paluch"那里得到了答案;这对我很有效。所以现在我可以使用Postgres驱动程序连接到Redshift了。

AmazonRedshift是基于Postgres的,所以你应该使用Postgres驱动程序。此邮件列表仅处理R2DBC规范方面。如果您正在寻找对R2DBC之上构建的特定库的支持,请通过他们的实际维护者联系,例如GitHub项目。

Pom.xml

<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-spi</artifactId>
<version>0.9.0.RELEASE</version>
</dependency>
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>

application.properties:
spring.r2dbc.url=r2dbc:postgresql://hostName:portNumber/databaseName
spring.r2dbc.username=redshiftUserName
spring.r2dbc.password=password

最新更新