| | |
| | | public class NkyServiceImpl implements INkyService { |
| | | |
| | | |
| | | private static final String API_PREFIX = "https://sk.hubeishuiyi.cn/warnIp/"; |
| | | private static final String API_PREFIX = "http://10.42.7.146:9503/"; |
| | | private static final String LOCAL_API_PREFIX = "https://sk.hubeishuiyi.cn/warnIp/"; |
| | | // ARIMA预测接口URL |
| | | private static final String ARIMA_PREDICT = API_PREFIX + "predict/arimaPredict"; |
| | | // ARIMA预测结果接口 |
| | |
| | | headers.add("Accept", MediaType.APPLICATION_JSON.toString()); |
| | | |
| | | HttpEntity<String> httpEntity = new HttpEntity(jsonparams, headers); |
| | | |
| | | System.out.println("请求参数:"+ jsonparams); |
| | | RestTemplate template = new RestTemplate(); |
| | | String resultStr = template.postForObject(url, httpEntity, String.class); |
| | | System.out.println(resultStr); |