公钥等属性注入去掉static修饰

xuyifeng-0724-人员中台对接-dev
water_xu 2024-06-27 17:03:08 +08:00
parent f83f0ff3ee
commit 899aac4cbd
1 changed files with 6 additions and 6 deletions

View File

@ -23,23 +23,23 @@ public class GJSendMessageUtil {
* ()
**/
@Value("${gongJiangXueYuanTestUrl}")
public static String SERVER_URL_TEST;
private String SERVER_URL_TEST;
/**
* ()
**/
@Value("${gongJiangXueYuanProdUrl}")
public static String SERVER_URL_PROD;
private String SERVER_URL_PROD;
/**
* RSA
**/
@Value("${gongJiangXueYuanSendPublicKey}")
public static String RSA_PUBLIC_KEY;
private String RSA_PUBLIC_KEY;
/**
*
**/
@Value("${gongJiangXueYuanSendPrivateKey}")
public static final String SECRET_KEY = "58e5e358b220335e7b1c6cc3576ceecc28b4a95d96cbbe0";
private final String SECRET_KEY = "58e5e358b220335e7b1c6cc3576ceecc28b4a95d96cbbe0";
/**
* header
@ -59,7 +59,7 @@ public class GJSendMessageUtil {
Map<String, Object> paramDataMap = new HashMap<>();
paramDataMap.put("userList", user);
// 发起请求
String body = createPostFormHttpRequest("/API-BACKEND/openapi/user/v1/syncNotify", paramDataMap);
String body = this.createPostFormHttpRequest("/API-BACKEND/openapi/user/v1/syncNotify", paramDataMap);
}
}
@ -70,7 +70,7 @@ public class GJSendMessageUtil {
* @param paramDataMap ()
* @return String
*/
public static String createPostFormHttpRequest(String uri, Map<String, Object> paramDataMap) throws Exception {
public String createPostFormHttpRequest(String uri, Map<String, Object> paramDataMap) throws Exception {
// 参数RSA加密
String paramDataJsonStr = JSON.toJSONString(paramDataMap);
String paramDataRsaEncrypt = GJRSAUtils.encrypt(paramDataJsonStr, RSA_PUBLIC_KEY);