①pom引入依赖
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4.1212</version>
</dependency>
②yml文件
spring:
datasource:
url: jdbc:postgresql://192.168.10.223:5866/highgo(数据库名称)?useSSL=false¤tSchema=pipe_network
name: dev
username: highgo
password: abcd=1234
# 使用druid数据源
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: org.postgresql.Driver
常见问题
1.org.postgresql.util.PSQLException: ERROR: relation "auth_user" does not exist
postgresql - > 默认连接使用的是highgo数据库的 public 模式
jdbc :postgresql : / /localhost : 5432 /highgo
postgresql - > 9.3 及以前的版本指定方式
spring .datasource .url =jdbc :postgresql : / /localhost : 5432 /highgo ?searchpath =newschema
postgresql - > 9.4及以后的版本指定方式
spring .datasource .url =jdbc :postgresql : / /localhost : 5432 /highgo ?currentSchema =newschema
资料来源:https://blog.csdn.net/qq_32719215/article/details/104943498
mysql改为postgresql 语法常见问题
标签:cal key opera href 连接 dep post 图片 png
查看更多关于mysql改为postgresql 语法常见问题的详细内容...