不指定schema的情况下默认使用 public schema
spring:
datasource:
url: jdbc:postgresql://localhost:5432/database
username: postgres
password: 123456
driverClassName: org.postgresql.Driver
type: com.alibaba.druid.pool.DruidDataSource
如使用同一数据库下的其他 schema 需要在url
中指定
spring:
datasource:
#9.4 及以后的版本指定方式
url: jdbc:postgresql://localhost:5432/database?currentSchema=schema
username: postgres
password: 123456
driverClassName: org.postgresql.Driver
type: com.alibaba.druid.pool.DruidDataSource