PostgreSQL.md
... ...
@@ -46,7 +46,7 @@
46 46
driverClassName=org.postgresql.Driver
47 47
url=jdbc:postgresql://localhost:5432/postgres?currentSchema=public&encoding=UTF-8&timezone=UTC
48 48
username=postgres
49
- password=passw0rd
49
+ password=******
50 50
```
51 51
52 52
**参考资料**
... ...
@@ -74,7 +74,7 @@
74 74
使用以下命令创建并运行一个 PostgreSQL 容器,并配置数据持久化:
75 75
76 76
```bash
77
- docker run --name postgres16 -e POSTGRES_PASSWORD=passw0rd -p 5432:5432 -v /opt/postgresql/data:/var/lib/postgresql/data -d docker.io/postgres:16.6
77
+ docker run --name postgres16 -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -v /opt/postgresql/data:/var/lib/postgresql/data -d docker.io/postgres:16.6
78 78
```
79 79
80 80
- `--name postgres16`:指定容器名称为 `postgres16`
... ...
@@ -104,14 +104,14 @@
104 104
105 105
5. **DBCP 配置**
106 106
107
- 已经在 `192.168.184.120` 安装了 PG,测试可以直接使用。PG 默认的模式是:`public`,可以通过设置 `currentSchema` 切换模式。
107
+ 已经在 `120` 安装了 PG,测试可以直接使用。PG 默认的模式是:`public`,可以通过设置 `currentSchema` 切换模式。
108 108
109 109
```properties
110 110
########postgresql########
111 111
driverClassName=org.postgresql.Driver
112
- url=jdbc:postgresql://192.168.184.120:5432/postgres?currentSchema=public&encoding=UTF-8&timezone=UTC
112
+ url=jdbc:postgresql://xxx.xxx.120:5432/postgres?currentSchema=public&encoding=UTF-8&timezone=UTC
113 113
username=postgres
114
- password=passw0rd
114
+ password=******
115 115
```
116 116
117 117
**参考资料**