src/main/java/com/ots/common/utils/Base64Utils.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/ots/framework/config/ShiroConfig.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
tai-ots-framework.iml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/ots/common/utils/Base64Utils.java
New file @@ -0,0 +1,40 @@ package com.ots.common.utils; import java.util.Base64; /** * @description: base64 加解密 * @author: zhijie * @create: 2022-01-03 17:27 **/ public class Base64Utils { /** * 加密 * @param data * @return */ public static String encode(String data){ Base64.Encoder encoder = Base64.getEncoder(); byte[] b = encoder.encode(data.getBytes()); b = encoder.encode(b); b = encoder.encode(b); return new String(b); } public static String decode(String data){ Base64.Decoder decoder = Base64.getDecoder(); byte[] b = decoder.decode(data.getBytes()); b = decoder.decode(b); b = decoder.decode(b); return new String(b); } public static void main(String[] args) { String str = Base64Utils.encode("411"); String str1 = Base64Utils.decode(str); System.out.println(str); System.out.println(str1); } } src/main/java/com/ots/framework/config/ShiroConfig.java
@@ -202,6 +202,9 @@ filterChainDefinitionMap.put("/api/exam/**", "anon"); filterChainDefinitionMap.put("/remote/member/**", "anon"); filterChainDefinitionMap.put("/profile/**", "anon"); //分享添加测试人员 filterChainDefinitionMap.put("/exam/testMember/shareAdd", "anon"); filterChainDefinitionMap.put("/exam/testMember/shareUrl", "anon"); Map<String, Filter> filters = new LinkedHashMap<String, Filter>(); tai-ots-framework.iml
File was deleted