日志命名

MD5工具类
This commit is contained in:
wangw 2025-02-08 15:03:05 +08:00
parent 80d1325753
commit 26833efde5
5 changed files with 19 additions and 4 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="30 seconds" debug="false">
<contextName>elAdmin</contextName>
<contextName>account-server</contextName>
<property name="log.charset" value="utf-8" />
<property name="log.pattern" value="%yellow(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %msg%n" />
<!--写入文件格式-->

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="30 seconds" debug="false">
<contextName>elAdmin</contextName>
<contextName>order-server</contextName>
<property name="log.charset" value="utf-8" />
<property name="log.pattern" value="%yellow(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %msg%n" />
<!--写入文件格式-->

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="30 seconds" debug="false">
<contextName>elAdmin</contextName>
<contextName>product-server</contextName>
<property name="log.charset" value="utf-8" />
<property name="log.pattern" value="%yellow(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %msg%n" />
<!--写入文件格式-->

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="30 seconds" debug="false">
<contextName>elAdmin</contextName>
<contextName>system-server</contextName>
<property name="log.charset" value="utf-8" />
<property name="log.pattern" value="%yellow(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %msg%n" />
<!--写入文件格式-->

View File

@ -0,0 +1,15 @@
package com.czg.utils;
import org.springframework.util.DigestUtils;
public class MD5Util {
/**
* MD5加密 十六进制
* @param str
* @return
*/
public static String md5AsHex(String str) {
return DigestUtils.md5DigestAsHex(str.getBytes());
}
}