Browse Source

bug修复

master
luogw 1 month ago
parent
commit
243058ca5b
  1. 6
      src/main/java/com/project/information/application/impl/KnowledgePointApplicationServiceImpl.java
  2. 2
      src/main/resources/application-dev.yml
  3. 2
      src/main/resources/application-test.yml

6
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<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());

2
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:

2
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:

Loading…
Cancel
Save