|
|
@@ -1,4 +1,4 @@
|
|
|
-package com.lxq.common.log.event;
|
|
|
+package com.lxq.admin.biz.event;
|
|
|
|
|
|
import cn.hutool.core.text.CharSequenceUtil;
|
|
|
import com.fasterxml.jackson.annotation.JsonFilter;
|
|
|
@@ -6,11 +6,12 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.fasterxml.jackson.databind.ser.FilterProvider;
|
|
|
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
|
|
|
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
|
|
|
-import com.lxq.common.core.constant.SecurityConstants;
|
|
|
import com.lxq.common.core.jackson.SkyJavaTimeModule;
|
|
|
import com.lxq.common.log.config.SkyLogProperties;
|
|
|
-import com.lxq.system.biz.feign.RemoteLogService;
|
|
|
+import com.lxq.common.log.event.SysLogEvent;
|
|
|
+import com.lxq.common.log.event.SysLogEventSource;
|
|
|
import com.lxq.system.biz.model.SysLog;
|
|
|
+import com.lxq.system.biz.service.SysLogService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.SneakyThrows;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -35,7 +36,7 @@ public class SysLogListener implements InitializingBean {
|
|
|
// new 一个 避免日志脱敏策略影响全局ObjectMapper
|
|
|
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
|
|
|
|
|
|
- private final RemoteLogService remoteLogService;
|
|
|
+ private final SysLogService sysLogService;
|
|
|
|
|
|
private final SkyLogProperties logProperties;
|
|
|
|
|
|
@@ -54,7 +55,7 @@ public class SysLogListener implements InitializingBean {
|
|
|
sysLog.setParams(CharSequenceUtil.subPre(params, logProperties.getMaxLength()));
|
|
|
}
|
|
|
log.info("保存日志:{}", sysLog);
|
|
|
- remoteLogService.saveLog(sysLog, SecurityConstants.FROM_IN);
|
|
|
+ sysLogService.saveLog(sysLog);
|
|
|
}
|
|
|
|
|
|
@Override
|