公钥等属性注入去掉static修饰
parent
f83f0ff3ee
commit
899aac4cbd
|
@ -23,23 +23,23 @@ public class GJSendMessageUtil {
|
||||||
* 工匠学苑 服务地址(测试环境)
|
* 工匠学苑 服务地址(测试环境)
|
||||||
**/
|
**/
|
||||||
@Value("${gongJiangXueYuanTestUrl}")
|
@Value("${gongJiangXueYuanTestUrl}")
|
||||||
public static String SERVER_URL_TEST;
|
private String SERVER_URL_TEST;
|
||||||
/**
|
/**
|
||||||
* 工匠学苑 服务地址(生产环境)
|
* 工匠学苑 服务地址(生产环境)
|
||||||
**/
|
**/
|
||||||
@Value("${gongJiangXueYuanProdUrl}")
|
@Value("${gongJiangXueYuanProdUrl}")
|
||||||
public static String SERVER_URL_PROD;
|
private String SERVER_URL_PROD;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工匠学苑 RSA公钥
|
* 工匠学苑 RSA公钥
|
||||||
**/
|
**/
|
||||||
@Value("${gongJiangXueYuanSendPublicKey}")
|
@Value("${gongJiangXueYuanSendPublicKey}")
|
||||||
public static String RSA_PUBLIC_KEY;
|
private String RSA_PUBLIC_KEY;
|
||||||
/**
|
/**
|
||||||
* 系统对接密钥
|
* 系统对接密钥
|
||||||
**/
|
**/
|
||||||
@Value("${gongJiangXueYuanSendPrivateKey}")
|
@Value("${gongJiangXueYuanSendPrivateKey}")
|
||||||
public static final String SECRET_KEY = "58e5e358b220335e7b1c6cc3576ceecc28b4a95d96cbbe0";
|
private final String SECRET_KEY = "58e5e358b220335e7b1c6cc3576ceecc28b4a95d96cbbe0";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签名 header
|
* 签名 header
|
||||||
|
@ -59,7 +59,7 @@ public class GJSendMessageUtil {
|
||||||
Map<String, Object> paramDataMap = new HashMap<>();
|
Map<String, Object> paramDataMap = new HashMap<>();
|
||||||
paramDataMap.put("userList", user);
|
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 请求参数(明文)
|
* @param paramDataMap 请求参数(明文)
|
||||||
* @return String
|
* @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加密
|
// 参数RSA加密
|
||||||
String paramDataJsonStr = JSON.toJSONString(paramDataMap);
|
String paramDataJsonStr = JSON.toJSONString(paramDataMap);
|
||||||
String paramDataRsaEncrypt = GJRSAUtils.encrypt(paramDataJsonStr, RSA_PUBLIC_KEY);
|
String paramDataRsaEncrypt = GJRSAUtils.encrypt(paramDataJsonStr, RSA_PUBLIC_KEY);
|
||||||
|
|
Loading…
Reference in New Issue