Commit fe94e4590a9b51764b273d1b95432b4bb9f57e62
1 parent
7c8bfa34
1. 增加日志服务
Showing
4 changed files
with
12 additions
and
1 deletions
README.md
| @@ -41,6 +41,7 @@ | @@ -41,6 +41,7 @@ | ||
| 41 | 1. 分布式锁:基于 Redis 实现分布式锁,满足并发场景 | 41 | 1. 分布式锁:基于 Redis 实现分布式锁,满足并发场景 |
| 42 | 1. 幂等组件:基于 Redis 实现幂等组件,解决重复请求问题 | 42 | 1. 幂等组件:基于 Redis 实现幂等组件,解决重复请求问题 |
| 43 | 1. 服务保障:基于 Resilience4j 实现服务的稳定性,包括限流、熔断等功能 | 43 | 1. 服务保障:基于 Resilience4j 实现服务的稳定性,包括限流、熔断等功能 |
| 44 | +1. 日志服务:轻量级日志中心,查看远程服务器的日志 | ||
| 44 | 45 | ||
| 45 | ### 研发工具 | 46 | ### 研发工具 |
| 46 | 47 |
src/main/java/cn/iocoder/dashboard/modules/system/service/common/impl/SysFileServiceImpl.java
| @@ -2,8 +2,8 @@ package cn.iocoder.dashboard.modules.system.service.common.impl; | @@ -2,8 +2,8 @@ package cn.iocoder.dashboard.modules.system.service.common.impl; | ||
| 2 | 2 | ||
| 3 | import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; | 3 | import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; |
| 4 | import cn.iocoder.dashboard.framework.file.config.FileProperties; | 4 | import cn.iocoder.dashboard.framework.file.config.FileProperties; |
| 5 | -import cn.iocoder.dashboard.modules.system.dal.mysql.common.SysFileMapper; | ||
| 6 | import cn.iocoder.dashboard.modules.system.dal.dataobject.common.SysFileDO; | 5 | import cn.iocoder.dashboard.modules.system.dal.dataobject.common.SysFileDO; |
| 6 | +import cn.iocoder.dashboard.modules.system.dal.mysql.common.SysFileMapper; | ||
| 7 | import cn.iocoder.dashboard.modules.system.service.common.SysFileService; | 7 | import cn.iocoder.dashboard.modules.system.service.common.SysFileService; |
| 8 | import org.springframework.stereotype.Service; | 8 | import org.springframework.stereotype.Service; |
| 9 | 9 |
src/main/resources/application-dev.yaml
| @@ -120,6 +120,11 @@ spring: | @@ -120,6 +120,11 @@ spring: | ||
| 120 | # Spring Boot Admin Server 服务端的相关配置 | 120 | # Spring Boot Admin Server 服务端的相关配置 |
| 121 | context-path: /admin # 配置 Spring | 121 | context-path: /admin # 配置 Spring |
| 122 | 122 | ||
| 123 | +# 日志文件配置 | ||
| 124 | +logging: | ||
| 125 | + file: | ||
| 126 | + path: ${user.home}/logs/ # 日志文件的路径 | ||
| 127 | + | ||
| 123 | --- #################### 芋道相关配置 #################### | 128 | --- #################### 芋道相关配置 #################### |
| 124 | 129 | ||
| 125 | # 芋道配置项,设置当前项目所有自定义的配置 | 130 | # 芋道配置项,设置当前项目所有自定义的配置 |
src/main/resources/application-local.yaml
| @@ -120,6 +120,11 @@ spring: | @@ -120,6 +120,11 @@ spring: | ||
| 120 | # Spring Boot Admin Server 服务端的相关配置 | 120 | # Spring Boot Admin Server 服务端的相关配置 |
| 121 | context-path: /admin # 配置 Spring | 121 | context-path: /admin # 配置 Spring |
| 122 | 122 | ||
| 123 | +# 日志文件配置 | ||
| 124 | +logging: | ||
| 125 | + file: | ||
| 126 | + path: ${user.home}/logs/ # 日志文件的路径 | ||
| 127 | + | ||
| 123 | --- #################### 芋道相关配置 #################### | 128 | --- #################### 芋道相关配置 #################### |
| 124 | 129 | ||
| 125 | # 芋道配置项,设置当前项目所有自定义的配置 | 130 | # 芋道配置项,设置当前项目所有自定义的配置 |