SpringBoot引入postgresql ①pom引入依赖 org.postgresql postgresql 9.4.1212②yml文件 spring: datasource: url: jdbc:pos
①pom引入依赖
org.postgresql
postgresql
9.4.1212
②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 语法常见问题
--结束END--
本文标题: mysql改为postgresql 语法常见问题
本文链接: https://www.lsjlt.com/news/8048.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-14
2024-05-14
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0