Skip to content

Commit 38d135e

Browse files
committed
使用环境变量配置Redis host,默认localhost,支持多环境部署
1 parent ea301b8 commit 38d135e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spring:
2020
database-platform: org.hibernate.dialect.MySQL8Dialect
2121
data:
2222
redis:
23-
host: 47.97.110.128
23+
host: ${REDIS_HOST:localhost}
2424
port: 6379
2525
password: ${REDIS_PASSWORD}
2626
timeout: 2s

0 commit comments

Comments
 (0)