Browse Source

fix:多数据源依赖移至子模块

zhongwei
haungxing 5 months ago
parent
commit
8753807b1d
  1. 1
      hzims-service/hzims-big-model/pom.xml
  2. 4
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/utils/RequestClientUtil.java
  3. 5
      pom.xml

1
hzims-service/hzims-big-model/pom.xml

@ -82,6 +82,7 @@
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>2.5.6</version>
</dependency>
</dependencies>

4
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/utils/RequestClientUtil.java

@ -25,9 +25,11 @@ public class RequestClientUtil {
* @param body 传参body
*/
public static void postCall(String url, Map body) {
log.info("开始远程调用{}接口",url);
HttpResponse response = HttpRequest.post(url).body(JSON.toJSONString(body)).execute();
log.info("远程调用{}接口结束",url);
Assert.isTrue(response.getStatus() == HttpServletResponse.SC_OK, () -> {
throw new ServiceException("远程调用大模型接口" + url + "失败!");
throw new ServiceException("远程调用接口" + url + "失败!");
});
}

5
pom.xml

@ -212,11 +212,6 @@
<artifactId>easypoi-spring-boot-starter</artifactId>
<version>${easpoi.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>2.5.6</version>
</dependency>
</dependencies>
</dependencyManagement>

Loading…
Cancel
Save