Skip to content

Commit

Permalink
Redis 启动需要是 127.0.0.1 才能在保护模式下连接
Browse files Browse the repository at this point in the history
  • Loading branch information
itwanger committed Mar 29, 2024
1 parent b79b700 commit a53d42f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,15 @@ git clone https://gitee.com/laigeoffer/pmhub.git
2. 如果用户名也是 root,那么只需要修改密码即可。
3. 如果密码也一样,那么就不需要修改了(不可能,绝对不可能这么巧😂)。

#### 第五步,启动项目
#### 第五步,启动 Redis

①、如果你是 macOS 用户,可以直接在终端输入`redis-server`启动 Redis。

![](https://cdn.tobebetterjavaer.com/images/README/1711692102829.png)

②、如果你是 Windows 用户,可以直接双击 redis-server.exe 启动 Redis。

#### 第六步,启动项目

找到 PmhubApplication 类,右键 Run PmhubApplication.main()。

Expand Down
4 changes: 2 additions & 2 deletions pmhub-admin/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spring:
master:
url: jdbc:mysql://127.0.0.1:3306/laigeoffer-pmhub?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: 123456
password: Codingmore123
# 从库数据源
slave:
# 从数据源开关/默认关闭
Expand Down Expand Up @@ -56,7 +56,7 @@ spring:
# redis 配置
redis:
# 地址
host: 0.0.0.0
host: 127.0.0.1
# 端口,默认为6379
port: 6379
# 数据库索引
Expand Down

0 comments on commit a53d42f

Please sign in to comment.