Commit 5c8a93cc authored by matianhao's avatar matianhao

[资产资源接口] <update> 修改获取文件路径

parent ad64e89a
......@@ -3,6 +3,7 @@ package com.mth.requestsecret.util;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.springframework.core.io.ClassPathResource;
import javax.crypto.Cipher;
import javax.crypto.SecretKeyFactory;
......@@ -155,7 +156,8 @@ public class AESUtils {
ScriptEngine engine = manager.getEngineByName("javascript");
// 读取js文件
FileReader reader = new FileReader(System.getProperty("user.dir") + "/src/main/resources/js/des.js");
ClassPathResource classPathResource = new ClassPathResource("js/des.js");
FileReader reader = new FileReader(classPathResource.getFile());
engine.eval(reader);
String encryptContent = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment