标签:split acea imp http pre isp jpg 定时任务 append
package com.wms.rf.system.conf; import com.p6spy.engine.spy.appender.MessageFormattingStrategy; import com.wms.rf.system.utils.DateUtil; import org.apache.commons.lang3.StringUtils; import java.time.LocalDateTime; public class P6spySqlFormatConfig implements MessageFormattingStrategy { /** * 过滤掉定时任务的 SQL */ @Override public String formatMessage(int connectionId, String now, long elapsed, String category, String prepared, String sql, String url) { return StringUtils.isNotBlank(sql) ? DateUtil.formatFullTime(LocalDateTime.now(), DateUtil.FULL_TIME_SPLIT_PATTERN) + " | 耗时 " + elapsed + " ms | SQL 语句:" + StringUtils.LF + sql.replaceAll("[\\s]+", StringUtils.SPACE) + ";" : ""; } }
标签:split acea imp http pre isp jpg 定时任务 append
原文地址:https://www.cnblogs.com/zhanghongke/p/12643789.html