如何配置R2DBC PostgreSQL的模式(schema)

11
我尝试使用Spring Data R2DBC与PostgreSQL。
我知道一些关于URL、用户名和密码的配置。
spring.r2dbc.url
spring.r2dbc.username
spring.r2dbc.password

有schema相关的内容吗? 有可用的设置列表吗?


是否有可用的设置清单?

2个回答

11

Schema是Postgres特定的,可以通过R2DBC连接URL进行配置:

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

另请参阅:


11

通过更漂亮的方式在属性中传递模式:

yaml 格式中:
spring:
  r2dbc:
    properties:
      schema: <yourSchema>

属性格式:
spring.r2dbc.properties.schema: <yourSchema>

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接