🎨 优化项目模块.

This commit is contained in:
lijiahang
2025-01-09 10:02:22 +08:00
parent 41797e41d2
commit 72579c7e83
11 changed files with 94 additions and 19 deletions

View File

@@ -105,4 +105,6 @@ public interface FieldConst {
String ALL = "all";
String CONFIG = "config";
}

View File

@@ -114,6 +114,25 @@ public interface FileClient {
*/
byte[] getContent(String path) throws Exception;
/**
* 获取文件内容
*
* @param path path
* @return content
* @throws Exception Exception
*/
String getContentAsString(String path) throws Exception;
/**
* 获取文件内容
*
* @param path path
* @param charset charset
* @return content
* @throws Exception Exception
*/
String getContentAsString(String path, String charset) throws Exception;
/**
* 获取文件输入流
*

View File

@@ -32,11 +32,11 @@ import org.dromara.visor.common.interfaces.RsaEncryptor;
* @version 1.0.0
* @since 2025/1/5 21:13
*/
public class RsaEncryptorUtils {
public class RsaEncryptUtils {
private static RsaEncryptor delegate;
private RsaEncryptorUtils() {
private RsaEncryptUtils() {
}
/**
@@ -60,11 +60,11 @@ public class RsaEncryptorUtils {
}
public static void setDelegate(RsaEncryptor delegate) {
if (RsaEncryptorUtils.delegate != null) {
if (RsaEncryptUtils.delegate != null) {
// unmodified
throw Exceptions.state();
}
RsaEncryptorUtils.delegate = delegate;
RsaEncryptUtils.delegate = delegate;
}
}