Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
383ff130
提交
383ff130
authored
6月 25, 2022
作者:
YunaiV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【新增】`yudao.access-log.enable` 访问日志的开关,默认在 `local` 环境关闭记录访问日志
上级
3774afe5
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
7 行增加
和
1 行删除
+7
-1
YudaoApiLogAutoConfiguration.java
...framework/apilog/config/YudaoApiLogAutoConfiguration.java
+3
-1
application-local.yaml
...odule-infra-biz/src/main/resources/application-local.yaml
+2
-0
application-local.yaml
...dule-system-biz/src/main/resources/application-local.yaml
+2
-0
没有找到文件。
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/apilog/config/YudaoApiLogAutoConfiguration.java
浏览文件 @
383ff130
...
...
@@ -5,13 +5,14 @@ import cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkServi
import
cn.iocoder.yudao.framework.apilog.core.service.ApiAccessLogFrameworkServiceImpl
;
import
cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLogFrameworkService
;
import
cn.iocoder.yudao.framework.apilog.core.service.ApiErrorLogFrameworkServiceImpl
;
import
cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum
;
import
cn.iocoder.yudao.framework.web.config.WebProperties
;
import
cn.iocoder.yudao.framework.web.config.YudaoWebAutoConfiguration
;
import
cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum
;
import
cn.iocoder.yudao.module.infra.api.logger.ApiAccessLogApi
;
import
cn.iocoder.yudao.module.infra.api.logger.ApiErrorLogApi
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.autoconfigure.AutoConfigureAfter
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.boot.web.servlet.FilterRegistrationBean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
...
...
@@ -36,6 +37,7 @@ public class YudaoApiLogAutoConfiguration {
* 创建 ApiAccessLogFilter Bean,记录 API 请求日志
*/
@Bean
@ConditionalOnProperty
(
prefix
=
"yudao.access-log"
,
value
=
"enable"
,
matchIfMissing
=
true
)
// 允许使用 yudao.access-log.enable=false 禁用访问日志
public
FilterRegistrationBean
<
ApiAccessLogFilter
>
apiAccessLogFilter
(
WebProperties
webProperties
,
@Value
(
"${spring.application.name}"
)
String
applicationName
,
ApiAccessLogFrameworkService
apiAccessLogFrameworkService
)
{
...
...
yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-local.yaml
浏览文件 @
383ff130
...
...
@@ -134,4 +134,6 @@ yudao:
exclude-urls
:
# 如下两个 url,仅仅是为了演示,去掉配置也没关系
-
${spring.boot.admin.context-path}/**
# 不处理 Spring Boot Admin 的请求
-
${management.endpoints.web.base-path}/**
# 不处理 Actuator 的请求
access-log
:
# 访问日志的配置项
enable
:
false
demo
:
false
# 关闭演示模式
yudao-module-system/yudao-module-system-biz/src/main/resources/application-local.yaml
浏览文件 @
383ff130
...
...
@@ -150,6 +150,8 @@ yudao:
pay-notify-url
:
http://niubi.natapp1.cc/api/pay/order/notify
pay-return-url
:
http://niubi.natapp1.cc/api/pay/order/return
refund-notify-url
:
http://niubi.natapp1.cc/api/pay/refund/notify
access-log
:
# 访问日志的配置项
enable
:
false
demo
:
false
# 关闭演示模式
justauth
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论