Commit f15414bf69cdba45979cc306dd64e93914ebd4da
1 parent
507f55f3
fix: 启动失败, springboot admin 无法识别主机名
Showing
1 changed file
with
3 additions
and
1 deletions
src/main/resources/application-local.yaml
| @@ -7,7 +7,7 @@ spring: | @@ -7,7 +7,7 @@ spring: | ||
| 7 | # 数据源配置项 TODO 多数据源;TODO 监控配置 | 7 | # 数据源配置项 TODO 多数据源;TODO 监控配置 |
| 8 | datasource: | 8 | datasource: |
| 9 | name: ruoyi-vue-pro | 9 | name: ruoyi-vue-pro |
| 10 | - url: jdbc:mysql://127.0.1:33061/${spring.datasource.name}?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT | 10 | + url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.name}?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT |
| 11 | driver-class-name: com.mysql.jdbc.Driver | 11 | driver-class-name: com.mysql.jdbc.Driver |
| 12 | username: root | 12 | username: root |
| 13 | password: 123456 | 13 | password: 123456 |
| @@ -98,6 +98,8 @@ spring: | @@ -98,6 +98,8 @@ spring: | ||
| 98 | # Spring Boot Admin Client 客户端的相关配置 | 98 | # Spring Boot Admin Client 客户端的相关配置 |
| 99 | client: | 99 | client: |
| 100 | url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址 | 100 | url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址 |
| 101 | + instance: | ||
| 102 | + prefer-ip: true | ||
| 101 | # Spring Boot Admin Server 服务端的相关配置 | 103 | # Spring Boot Admin Server 服务端的相关配置 |
| 102 | context-path: /admin # 配置 Spring | 104 | context-path: /admin # 配置 Spring |
| 103 | 105 |