优化代码

This commit is contained in:
RuoYi
2022-02-12 21:23:07 +08:00
parent 2f4c975615
commit 0086cc9f53
26 changed files with 44 additions and 65 deletions

View File

@ -1,5 +1,6 @@
package com.ruoyi.common.utils.security;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -55,7 +56,7 @@ public class Md5Utils
{
try
{
return new String(toHex(md5(s)).getBytes("UTF-8"), "UTF-8");
return new String(toHex(md5(s)).getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8);
}
catch (Exception e)
{