Trying to run spring boot with r2dbc and init database. My build.gradle looks like:
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.liquibase:liquibase-core'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'org.liquibase:liquibase-core'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'io.r2dbc:r2dbc-h2'
runtimeOnly 'io.r2dbc:r2dbc-postgresql'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.projectreactor:reactor-test'
}
Spring properties:
spring.r2dbc.url=r2dbc:postgresql://127.0.0.1:5432/test
spring.r2dbc.username=postgres
spring.r2dbc.password=123
spring.r2dbc.pool.enabled=true
spring.r2dbc.pool.initial-size=10
spring.data.r2dbc.repositories.enabled=true
spring.liquibase.change-log=classpath:/db/changelog/db.changelog-master.yaml
spring.liquibase.url=jdbc:postgresql://127.0.0.1:5432/test
spring.liquibase.user=postgres
spring.datasource.driver-class-name=org.postgresql.Driver
logging.level.liquibase = INFO
And after starting it falls with
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [liquibase.integration.spring.SpringLiquibase]: Factory method 'liquibase' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/jdbc/datasource/SimpleDriverDataSource
What do I do incorrectly?