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 |   61 ++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/jh-server/pom.xml b/jh-server/pom.xml
index 3041afa..1cb4e5d 100644
--- a/jh-server/pom.xml
+++ b/jh-server/pom.xml
@@ -134,18 +134,52 @@
             <version>${openfeign.version}</version>
         </dependency>
 
+<!--
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-devtools</artifactId>
             <scope>runtime</scope>
             <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>
@@ -163,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