From fce96ef468291fb9a0e6a4d34ab371315e9485d4 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期六, 03 十月 2026 00:59:44 +0800
Subject: [PATCH] ai优化
---
jh-server/pom.xml | 72 +++++++++++++++++++++++++++++++++++-
1 files changed, 70 insertions(+), 2 deletions(-)
diff --git a/jh-server/pom.xml b/jh-server/pom.xml
index e2de31e..1cb4e5d 100644
--- a/jh-server/pom.xml
+++ b/jh-server/pom.xml
@@ -128,17 +128,58 @@
<artifactId>jh-spring-boot-starter-protection</artifactId>
</dependency>
-<!-- <dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-starter-openfeign</artifactId>
+ <version>${openfeign.version}</version>
+ </dependency>
+
+<!--
+ <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
- </dependency>-->
+ <optional>true</optional>
+ </dependency>
+-->
</dependencies>
<build>
<!-- 璁剧疆鏋勫缓鐨� jar 鍖呭悕 -->
<finalName>${project.artifactId}</finalName>
+
+ <!--
+ 鍚堝苟閮ㄧ讲锛氭妸 ecg_web 鐨勫墠绔瀯寤轰骇鐗╂墦杩� jar銆�
+
+ 路 鐩爣鐩綍閫� META-INF/resources/frontend 鑰岄潪 static锛�
+ META-INF/resources 鏄� Servlet 3.0 鏍囧噯闈欐�佽祫婧愮洰褰曪紝Spring Boot
+ 榛樿浼氭壂鎻忥紱棰濆鍔犱竴灞� frontend/ 鍓嶇紑锛屼究浜庡悗绔敤
+ addResourceHandlers 绮剧‘鎺у埗"鍝簺 URL 浜ょ粰鍓嶇"锛�
+ 涓嶅奖鍝嶅悗绔凡鏈夌殑 /doc.html銆�/druid/**銆�/profile/** 绛夎矾寰勩��
+ 瑙� cn.lihu.jh.server.ecg.FrontendResourceConfig銆�
+
+ 路 浜х墿鐩綍鐢� profile 娉ㄥ叆鐨� env.VITE_OUT_DIR 鍐冲畾锛�
+ 榛樿 dist-merged锛堝搴� ecg_web 鐨� `pnpm build:merged`锛夈��
+
+ 路 娉ㄦ剰锛氭湰妯″潡銆愪笉銆戝紩鍏� frontend-maven-plugin銆�
+ 鍓嶇鏋勫缓璇峰湪閮ㄧ讲鍓嶅崟鐙墽琛岋紙cd ecg_web && pnpm build:merged锛夛紝
+ 閬垮厤鍚庣鏋勫缓寮轰緷璧� node/pnpm锛屼篃閬垮厤鏋勫缓鏈洪渶瑕佸缃戜笅杞� node銆�
+ -->
+ <resources>
+ <!-- 淇濈暀鍘熸湁鐨勫悗绔祫婧愶紙application*.yaml銆乴ogback-spring.xml 绛夛級 -->
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>false</filtering>
+ </resource>
+ <!-- 鏂板锛氬墠绔骇鐗� -->
+ <resource>
+ <directory>${project.basedir}/../../ecg_web/${env.VITE_OUT_DIR}</directory>
+ <targetPath>META-INF/resources/frontend</targetPath>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+
<plugins>
<!-- 鎵撳寘 -->
<plugin>
@@ -156,4 +197,31 @@
</plugins>
</build>
+ <!--
+ 鍓嶇浜х墿鐩綍鐨勯�夋嫨銆俥nv.VITE_OUT_DIR 浼氳涓婇潰 <resources> 寮曠敤銆�
+
+ 路 frontend-merged锛堥粯璁わ級锛氫娇鐢� ecg_web 鎵ц `pnpm build:merged` 浜у嚭鐨�
+ dist-merged锛屽搴�"鍓嶇鎵撹繘 jar銆佷笌鍚庣鍚屾簮"鐨勫悎骞堕儴缃叉ā寮忋��
+ 路 frontend-prod锛氬洖閫�鍒板師鏈夌殑 dist-prod銆傝嫢鍓嶇浠嶇敱 nginx 鐙珛鎵樼
+ 锛堝嵆涓嶅仛鍚堝苟閮ㄧ讲锛夛紝鐢� -P frontend-prod 婵�娲绘 profile 鍗冲彲锛�
+ 姝ゆ椂 jar 鍐呬笉鍚墠绔紝琛屼负涓庢敼閫犲墠涓�鑷淬��
+ -->
+ <profiles>
+ <profile>
+ <id>frontend-merged</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <properties>
+ <env.VITE_OUT_DIR>dist-merged</env.VITE_OUT_DIR>
+ </properties>
+ </profile>
+ <profile>
+ <id>frontend-prod</id>
+ <properties>
+ <env.VITE_OUT_DIR>dist-prod</env.VITE_OUT_DIR>
+ </properties>
+ </profile>
+ </profiles>
+
</project>
--
Gitblit v1.9.3