Commit 941bcb5d authored by jiaorz's avatar jiaorz

日志打印

parent 4163bc45
......@@ -6,6 +6,7 @@ import com.github.wxiaoqi.security.common.log.entity.LogEntity;
import com.github.wxiaoqi.security.common.log.entity.XxLogEntity;
import com.github.wxiaoqi.security.common.msg.BaseResponse;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -25,6 +26,7 @@ import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@Service
@Slf4j
public class CommonLogServiceImpl implements CommonLogService {
@Value("${spring.application.name}")
......@@ -86,6 +88,7 @@ public class CommonLogServiceImpl implements CommonLogService {
}
@Override
public void run() {
log.info("用户请求信息:xxLogEntity = {}", xxLogEntity.toString());
mongoTemplate.insert(xxLogEntity, xxLogEntity.getMongoKey());
}
}
......
......@@ -14,13 +14,13 @@ import java.util.Date;
public class XxLogEntity implements Serializable {
private String app;
private String method;
private String createDate;
private String servletPath;
private String requestPath;
private String requestData;
private String responseData;
private String createDate;
private String endDate;
private String requestPath;
private String method;
private String mongoKey;
public XxLogEntity() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment