|
|
|
@ -47,7 +47,7 @@ public class KnowledgePointApplicationServiceImpl implements KnowledgePointAppli |
|
|
|
|
|
|
|
private final RestTemplate restTemplate = new RestTemplate(); |
|
|
|
|
|
|
|
@Value("${analysis.host:172.16.204.50}") |
|
|
|
@Value("${analysis.host:http://172.16.204.50}") |
|
|
|
private String analysisHost; |
|
|
|
@Value("${analysis.port:8888}") |
|
|
|
private String analysisPort; |
|
|
|
@ -95,10 +95,8 @@ public class KnowledgePointApplicationServiceImpl implements KnowledgePointAppli |
|
|
|
HttpEntity<MultiValueMap<String, Object>> requestEntity = |
|
|
|
new HttpEntity<>(body, headers); |
|
|
|
|
|
|
|
String heard = analysisHost.contains("vicp") ? "https" : "http"; |
|
|
|
|
|
|
|
ResponseEntity<String> response = |
|
|
|
restTemplate.postForEntity(heard + "://"+analysisHost+":"+analysisPort+analysisUrl, requestEntity, String.class); |
|
|
|
restTemplate.postForEntity(analysisHost+":"+analysisPort+analysisUrl, requestEntity, String.class); |
|
|
|
|
|
|
|
log.info("文件 [{}] 解析请求成功,返回结果:{}", file.getOriginalFilename(), response.getBody()); |
|
|
|
|
|
|
|
|