|
@@ -2,6 +2,8 @@ package com.caimei.modules.opensearch;
|
|
|
|
|
|
import com.thinkgem.jeesite.common.config.Global;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.util.LinkedMultiValueMap;
|
|
|
+import org.springframework.util.MultiValueMap;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
/**
|
|
@@ -17,9 +19,10 @@ public class GenerateUtils {
|
|
|
// 获取www服务器地址
|
|
|
String wwwServer = Global.getConfig("wwwServer");
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
|
+ MultiValueMap<String, Integer> paramMap = new LinkedMultiValueMap<>();
|
|
|
String uri = wwwServer + "/generate/home";
|
|
|
// 发起Post请求
|
|
|
- String result = restTemplate.postForObject(uri, null, String.class);
|
|
|
+ String result = restTemplate.postForObject(uri, paramMap, String.class);
|
|
|
System.out.println("生成www静态首页:" + result);
|
|
|
}
|
|
|
|