diff --git a/core/core-backend/src/main/java/io/dataease/menu/manage/MenuManage.java b/core/core-backend/src/main/java/io/dataease/menu/manage/MenuManage.java index c0c11a81f2..5245e80cec 100644 --- a/core/core-backend/src/main/java/io/dataease/menu/manage/MenuManage.java +++ b/core/core-backend/src/main/java/io/dataease/menu/manage/MenuManage.java @@ -97,6 +97,7 @@ public class MenuManage { || coreMenu.getId().equals(25L) || coreMenu.getId().equals(26L) || coreMenu.getId().equals(27L) + || coreMenu.getId().equals(28L) || coreMenu.getId().equals(35L) || coreMenu.getId().equals(40L) || coreMenu.getId().equals(50L); diff --git a/core/core-backend/src/main/java/io/dataease/visualization/server/StaticResourceServer.java b/core/core-backend/src/main/java/io/dataease/visualization/server/StaticResourceServer.java index d8a4962c7a..2ac382834f 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/server/StaticResourceServer.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/server/StaticResourceServer.java @@ -11,7 +11,6 @@ import io.dataease.utils.StaticResourceUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.util.Assert; -import org.springframework.util.Base64Utils; import org.springframework.util.FileCopyUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -24,6 +23,7 @@ import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.Base64; import java.util.HashMap; import java.util.Map; @@ -91,7 +91,7 @@ public class StaticResourceServer implements StaticResourceApi { } else { if (StringUtils.isNotEmpty(content)) { Files.createFile(uploadPath); - FileCopyUtils.copy(Base64Utils.decodeFromString(content), Files.newOutputStream(uploadPath)); + FileCopyUtils.copy(Base64.getDecoder().decode(content), Files.newOutputStream(uploadPath)); } } } catch (Exception e) { diff --git a/core/core-backend/src/main/resources/i18n/core_zh_CN.properties b/core/core-backend/src/main/resources/i18n/core_zh_CN.properties index 8fd073f708..c8da7ea921 100644 --- a/core/core-backend/src/main/resources/i18n/core_zh_CN.properties +++ b/core/core-backend/src/main/resources/i18n/core_zh_CN.properties @@ -24,9 +24,10 @@ i18n_menu.summary=\u6982\u89C8 i18n_menu.ds=\u6570\u636E\u8FDE\u63A5\u7BA1\u7406 i18n_menu.task=\u4EFB\u52A1\u7BA1\u7406 i18n_menu.embedded=\u5D4C\u5165\u5F0F\u7BA1\u7406 +i18n_menu.plugin=\u63D2\u4EF6\u7BA1\u7406 i18n_menu.platform=\u5E73\u53F0\u5BF9\u63A5 i18n_menu.appearance=\u5916\u89C2\u914D\u7F6E -i18n_menu.sysVariable=\u7cfb\u7edf\u53d8\u91cf +i18n_menu.sysVariable=\u7CFB\u7EDF\u53D8\u91CF i18n_field_name_repeat=\u6709\u91CD\u590D\u5B57\u6BB5\u540D\uFF1A i18n_pid_not_eq_id=\u79FB\u52A8\u76EE\u6807\u4E0D\u80FD\u662F\u81EA\u5DF1\u6216\u5B50\u76EE\u5F55 i18n_ds_name_exists=\u8BE5\u5206\u7EC4\u4E0B\u540D\u79F0\u91CD\u590D @@ -42,7 +43,7 @@ i18n_table_duplicate=\u76F8\u540C\u8282\u70B9\u9700\u91CD\u65B0\u62D6\u5165\u624 i18n_no_column_permission=\u6CA1\u6709\u5217\u6743\u9650 i18n_fetch_error=SQL\u6267\u884C\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u8868\u3001\u5B57\u6BB5\u3001\u5173\u8054\u5173\u7CFB\u7B49\u4FE1\u606F\u662F\u5426\u6B63\u786E\u5E76\u91CD\u65B0\u7F16\u8F91\u3002 i18n_no_datasource_permission=\u65E0\u6570\u636E\u6E90\u8BBF\u95EE\u6743\u9650 -i18n_not_full=\u5f53\u524d\u6570\u636e\u6e90\u4e0d\u652f\u6301\u5168\u8fde\u63a5 +i18n_not_full=\u5F53\u524D\u6570\u636E\u6E90\u4E0D\u652F\u6301\u5168\u8FDE\u63A5 i18n_field_circular_ref=\u5B57\u6BB5\u5B58\u5728\u5FAA\u73AF\u5F15\u7528 diff --git a/core/core-frontend/src/assets/svg/plugin.svg b/core/core-frontend/src/assets/svg/plugin.svg new file mode 100644 index 0000000000..5151777ba4 --- /dev/null +++ b/core/core-frontend/src/assets/svg/plugin.svg @@ -0,0 +1,3 @@ + + + diff --git a/de-xpack b/de-xpack index 44b16d7cfc..bb258796ea 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit 44b16d7cfc1d05167aeecad51767da723af45abd +Subproject commit bb258796ea5e3d47b02d4d09afb378479cc1e163 diff --git a/sdk/common/src/main/java/io/dataease/utils/RsaUtils.java b/sdk/common/src/main/java/io/dataease/utils/RsaUtils.java index b5c781a9a7..cafe0c2b76 100644 --- a/sdk/common/src/main/java/io/dataease/utils/RsaUtils.java +++ b/sdk/common/src/main/java/io/dataease/utils/RsaUtils.java @@ -6,11 +6,9 @@ import io.dataease.model.RSAModel; import io.dataease.rsa.dao.entity.CoreRsa; import io.dataease.rsa.manage.RsaManage; import jakarta.annotation.Resource; -import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.RandomStringUtils; import org.springframework.stereotype.Component; -import org.springframework.util.Base64Utils; import javax.crypto.Cipher; import javax.crypto.SecretKey; @@ -21,6 +19,7 @@ import java.nio.charset.StandardCharsets; import java.security.*; import java.security.spec.PKCS8EncodedKeySpec; import java.security.spec.X509EncodedKeySpec; +import java.util.Base64; @Component public class RsaUtils { @@ -62,7 +61,7 @@ public class RsaUtils { KeyFactory keyFactory = null; try { keyFactory = KeyFactory.getInstance("RSA"); - byte[] decodedKey = Base64.decodeBase64(privateKey.getBytes()); + byte[] decodedKey = Base64.getDecoder().decode(privateKey.getBytes()); PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(decodedKey); return keyFactory.generatePrivate(keySpec); } catch (Exception e) { @@ -75,7 +74,7 @@ public class RsaUtils { KeyFactory keyFactory = null; try { keyFactory = KeyFactory.getInstance("RSA"); - byte[] decodedKey = Base64.decodeBase64(publicKey.getBytes()); + byte[] decodedKey = Base64.getDecoder().decode(publicKey.getBytes()); X509EncodedKeySpec keySpec = new X509EncodedKeySpec(decodedKey); return keyFactory.generatePublic(keySpec); } catch (Exception e) { @@ -104,13 +103,13 @@ public class RsaUtils { } byte[] encryptedData = out.toByteArray(); out.close(); - return Base64.encodeBase64String(encryptedData); + return Base64.getEncoder().encodeToString(encryptedData); } private static String decrypt(String data, PrivateKey privateKey) throws Exception { Cipher cipher = Cipher.getInstance("RSA"); cipher.init(Cipher.DECRYPT_MODE, privateKey); - byte[] dataBytes = Base64.decodeBase64(data); + byte[] dataBytes = Base64.getDecoder().decode(data); int inputLen = dataBytes.length; ByteArrayOutputStream out = new ByteArrayOutputStream(); int offset = 0; @@ -132,8 +131,8 @@ public class RsaUtils { public static RSAModel generate() { KeyPair keyPair = getKeyPair(); - String privateKey = new String(Base64.encodeBase64(keyPair.getPrivate().getEncoded())); - String publicKey = new String(Base64.encodeBase64(keyPair.getPublic().getEncoded())); + String privateKey = new String(Base64.getEncoder().encode(keyPair.getPrivate().getEncoded())); + String publicKey = new String(Base64.getEncoder().encode(keyPair.getPublic().getEncoded())); RSAModel rsaModel = new RSAModel(); rsaModel.setPrivateKey(privateKey); rsaModel.setPublicKey(publicKey); @@ -173,7 +172,7 @@ public class RsaUtils { String publicKey = coreRsa.getPublicKey(); String aesKey = coreRsa.getAesKey(); String pk = ascEncrypt(publicKey, aesKey).replaceAll("[\\s*\t\n\r]", ""); - String separator = Base64Utils.encodeToUrlSafeString(PK_SEPARATOR.getBytes(StandardCharsets.UTF_8)); + String separator = Base64.getUrlEncoder().encodeToString(PK_SEPARATOR.getBytes(StandardCharsets.UTF_8)); return pk + separator + aesKey; } @@ -184,24 +183,17 @@ public class RsaUtils { } private static String ascEncrypt(String message, String key) { - /*byte[] baseKey = key.getBytes(StandardCharsets.UTF_8); - byte[] ivBytes = IV_KEY.getBytes(StandardCharsets.UTF_8); - AES aes = new AES("CBC", "PKCS7Padding", baseKey, ivBytes); - byte[] messageBytes = message.getBytes(StandardCharsets.UTF_8); - return Base64Utils.encodeToString(aes.encrypt(messageBytes));*/ - Cipher cipher = null; try { byte[] baseKey = key.getBytes(StandardCharsets.UTF_8); byte[] ivBytes = IV_KEY.getBytes(StandardCharsets.UTF_8); byte[] messageBytes = message.getBytes(StandardCharsets.UTF_8); cipher = Cipher.getInstance("AES/CBC/PKCS7Padding"); - // 根据secretKey(密钥)的字节内容,"恢复"秘钥对象 SecretKey keySpec = new SecretKeySpec(baseKey, "AES"); IvParameterSpec ivps = new IvParameterSpec(ivBytes); cipher.init(Cipher.ENCRYPT_MODE, keySpec, ivps); byte[] data = cipher.doFinal(messageBytes); - return Base64.encodeBase64String(data); + return Base64.getEncoder().encodeToString(data); } catch (Exception e) { LogUtil.error(e.getMessage(), e); throw new RuntimeException(e); diff --git a/sdk/common/src/main/java/io/dataease/utils/StaticResourceUtils.java b/sdk/common/src/main/java/io/dataease/utils/StaticResourceUtils.java index 7736aa3e04..1bb4350c7b 100644 --- a/sdk/common/src/main/java/io/dataease/utils/StaticResourceUtils.java +++ b/sdk/common/src/main/java/io/dataease/utils/StaticResourceUtils.java @@ -3,11 +3,11 @@ package io.dataease.utils; import org.apache.commons.lang3.StringUtils; import org.springframework.lang.NonNull; import org.springframework.util.Assert; -import org.springframework.util.Base64Utils; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; +import java.util.Base64; import static io.dataease.constant.StaticResourceConstants.*; @@ -86,7 +86,7 @@ public class StaticResourceUtils { } // Encode byte array as Base64 if (buffer != null) { - return Base64Utils.encodeToString(buffer); + return Base64.getEncoder().encodeToString(buffer); } else { return null; }