修改项目中的日志框架为log4j2异步形式输出,解决mybatis日志在控制台直接打印等的问题
This commit is contained in:
@@ -1,5 +1,20 @@
|
||||
package com.nis.web.task;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.ServiceRuntimeException;
|
||||
import com.nis.util.Configurations;
|
||||
@@ -8,16 +23,16 @@ import com.nis.util.ExceptionUtil;
|
||||
import com.nis.util.JedisUtils;
|
||||
import com.nis.web.service.SpringContextHolder;
|
||||
import com.nis.web.service.restful.ConfigJedisServiceimpl;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.stereotype.Component;
|
||||
import redis.clients.jedis.*;
|
||||
|
||||
import redis.clients.jedis.Jedis;
|
||||
import redis.clients.jedis.JedisCluster;
|
||||
import redis.clients.jedis.JedisPool;
|
||||
import redis.clients.jedis.ScanParams;
|
||||
import redis.clients.jedis.ScanResult;
|
||||
import redis.clients.jedis.Tuple;
|
||||
import redis.clients.jedis.exceptions.JedisException;
|
||||
import redis.clients.util.JedisClusterCRC16;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Component
|
||||
@PropertySource(value = { "classpath:nis.properties", "classpath:jdbc.properties" })
|
||||
public class SyncRedisToCluster {
|
||||
@@ -57,7 +72,7 @@ public class SyncRedisToCluster {
|
||||
}
|
||||
}
|
||||
|
||||
//@Scheduled(cron = "${syncRedisToClusterCron}")
|
||||
// @Scheduled(cron = "${syncRedisToClusterCron}")
|
||||
public void syncRedisToCluster() {
|
||||
JedisCluster jedisCluster = getResource();
|
||||
String requestId = UUID.randomUUID().toString();
|
||||
|
||||
Reference in New Issue
Block a user