Spring boot Application.properties和r2dbc

Spring boot Application.properties和r2dbc,spring-boot,spring-data-r2dbc,r2dbc,Spring Boot,Spring Data R2dbc,R2dbc,我将spring boot 2.2与spring cloud Hoxton.SR1一起使用 我的数据库没有任何配置类。我只有一个application.properties来设置数据库 在我的application.properties中,我有 spring.r2dbc.url=r2dbc:postgresql://localhost:5432/test spring.r2dbc.schema=mcm spring.r2dbc.username=test_user spring.r2dbc.pa

我将spring boot 2.2与spring cloud Hoxton.SR1一起使用

我的数据库没有任何配置类。我只有一个application.properties来设置数据库

在我的application.properties中,我有

spring.r2dbc.url=r2dbc:postgresql://localhost:5432/test
spring.r2dbc.schema=mcm
spring.r2dbc.username=test_user
spring.r2dbc.password=zaA41"Vv8%q96@Y>
spring.r2dbc.pool.initial-size=100
spring.r2dbc.pool.max-size=500
spring.r2dbc.pool.max-idle-time=30m
spring.r2dbc.pool.validation-query=SELECT
当我开始申请时

我有一大堆

内建gradle

implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation 'org.springframework.cloud:spring-cloud-starter-gateway'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'

implementation 'org.springframework.boot.experimental:spring-boot-starter-data-r2dbc'

runtimeOnly 'io.r2dbc:r2dbc-postgresql'
runtimeOnly 'org.postgresql:postgresql'

看起来您的类路径上没有Postgres驱动程序(
r2dbc postgresql
,版本0.8.0.RELEASE)。我在postgresql中有它。这现在是与初始堆栈跟踪不同的堆栈跟踪。以前,没有找到驱动程序。这是一个
NullPointerException
。似乎有一个特定的bean设置会导致循环bean初始化,循环回到
afterPropertiesSet()
,而
afterPropertiesSet()
尚未完全执行。你能把代码发到复制机上吗?我在那里复制了文件:非常感谢。这个问题目前看起来像是一个我们可以在SpringDataCommons中修复的bug。我归档了。