diff --git a/src/main/java/com/project/information/application/impl/KnowledgePointApplicationServiceImpl.java b/src/main/java/com/project/information/application/impl/KnowledgePointApplicationServiceImpl.java index 7c7f3de..a4f90f2 100644 --- a/src/main/java/com/project/information/application/impl/KnowledgePointApplicationServiceImpl.java +++ b/src/main/java/com/project/information/application/impl/KnowledgePointApplicationServiceImpl.java @@ -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> requestEntity = new HttpEntity<>(body, headers); - String heard = analysisHost.contains("vicp") ? "https" : "http"; - ResponseEntity response = - restTemplate.postForEntity(heard + "://"+analysisHost+":"+analysisPort+analysisUrl, requestEntity, String.class); + restTemplate.postForEntity(analysisHost+":"+analysisPort+analysisUrl, requestEntity, String.class); log.info("文件 [{}] 解析请求成功,返回结果:{}", file.getOriginalFilename(), response.getBody()); diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index ac1060d..6054a68 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -65,7 +65,7 @@ milvus: host: 172.16.204.50 port: 19530 analysis: - host: 172.16.204.50 + host: http://172.16.204.50 port: 8888 url: /word/parse ding: diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml index e7bb458..81e25da 100644 --- a/src/main/resources/application-test.yml +++ b/src/main/resources/application-test.yml @@ -62,7 +62,7 @@ milvus: host: 8.129.84.155 port: 19530 analysis: - host: 107pm707566hq.vicp.fun + host: https://107pm707566hq.vicp.fun port: 443 url: /analysis/word/parse ding: