Commit 115033cf authored by fangxinjiang's avatar fangxinjiang

init

parent 7181c6e9
...@@ -8,9 +8,9 @@ import org.springframework.http.ResponseEntity; ...@@ -8,9 +8,9 @@ import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
/** /**
* @author fxj * @author fxj
* @date 2022年05月23日 9:47 * @date 2022/5/23 18:13
*/ */
@Log4j2 @Log4j2
public class HttpDaprUtil { public class HttpDaprUtil {
private static RestTemplate restTemplate; private static RestTemplate restTemplate;
...@@ -18,16 +18,16 @@ public class HttpDaprUtil { ...@@ -18,16 +18,16 @@ public class HttpDaprUtil {
private static StringBuffer stringBuffer; private static StringBuffer stringBuffer;
/** /**
* @author fxj * @param appUrl
* @date 2022-05-23 17:56 * @param appId
* @param appUrl * @param method
* @param appId * @param param
* @param method * @param cs
* @param param * @return com.yifu.cloud.plus.v1.yifu.common.core.util.R<T>
* @param cs * @author fxj
* @return com.yifu.cloud.plus.v1.yifu.common.core.util.R<T> * @date 2022-05-23 17:56
* @description get请求获取指定对象信息 * @description get请求获取指定对象信息
**/ **/
public static <T> R<T> invokeMothod(String appUrl, String appId, String method, String param, Class cs) throws Exception { public static <T> R<T> invokeMothod(String appUrl, String appId, String method, String param, Class cs) throws Exception {
// 实例化 RestTemplate // 实例化 RestTemplate
if (null == restTemplate) { if (null == restTemplate) {
...@@ -49,6 +49,14 @@ public class HttpDaprUtil { ...@@ -49,6 +49,14 @@ public class HttpDaprUtil {
} }
/**
* @param appUrl
* @param appId
* @param method
* @param param
* @author fxj
* @date 2022/5/23 18:11
*/
private static void initUrl(String appUrl, String appId, String method, String param) { private static void initUrl(String appUrl, String appId, String method, String param) {
stringBuffer = new StringBuffer(); stringBuffer = new StringBuffer();
stringBuffer.append(appUrl); stringBuffer.append(appUrl);
......
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