公钥等属性注入去掉static修饰
parent
f83f0ff3ee
commit
899aac4cbd
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue