How to configure schema for R2DBC PostgreSQL

Viewed 4017

I try to use Spring Data R2DBC with postgres.

I know some configuration for url, username, password.

spring.r2dbc.url
spring.r2dbc.username
spring.r2dbc.password

Is there something for the schema? Any list of setting available?

2 Answers

Schema is Postgres-specific and can be configured through the R2DBC Connection URL:

r2dbc:postgresql://<server>:<port>/<database>?schema=<yourSchema>

See also:

More pretty way to pass schema in properties: in yaml format:

spring:
  r2dbc:
    properties:
      schema: <yourSchema>

or properties format:

spring.r2dbc.properties.schema: <yourSchema>
Related