robert trudel
robert trudel

Reputation: 5749

How to configure schema for R2DBC PostgreSQL

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?

Upvotes: 12

Views: 9168

Answers (2)

antoniOS
antoniOS

Reputation: 419

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

spring:
  r2dbc:
    properties:
      schema: <yourSchema>

or properties format:

spring.r2dbc.properties.schema: <yourSchema>

Upvotes: 15

mp911de
mp911de

Reputation: 18119

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

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

See also:

Upvotes: 12

Related Questions