From f92600ec2835c9ad48b5f20d2ca18cf25931ff44 Mon Sep 17 00:00:00 2001
From: shikeying <shikeying@163.com>
Date: 星期四, 27 十月 2022 18:54:44 +0800
Subject: [PATCH] 添加测试配置部署

---
 deploy-jar-template/pom.xml                                                             |   34 +++++++++++
 deploy-jar-template/src/main/resources/application-test.yml                             |  117 +++++++++++++++++++++++++++++++++++++++
 recommend-video/src/main/java/com/iplatform/recvideo/config/VideoSimilarProperties.java |    2 
 deploy-jar-template/src/main/resources/application-dev.yml                              |   15 +++-
 deploy-jar-template/src/main/resources/sftp.properties                                  |    5 +
 5 files changed, 169 insertions(+), 4 deletions(-)

diff --git a/deploy-jar-template/pom.xml b/deploy-jar-template/pom.xml
index 885289e..3f41e8c 100644
--- a/deploy-jar-template/pom.xml
+++ b/deploy-jar-template/pom.xml
@@ -40,4 +40,38 @@
 
     </dependencies>
 
+    <build>
+        <finalName>train-recommend</finalName>
+        <plugins>
+            <plugin>
+                <!--鑳藉鑷姩瀵绘壘springboot寮曞绫伙紝鎴栬�呮墜鍔ㄦ寚瀹�-->
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>default-deploy</id>
+                        <phase>deploy</phase>
+                        <goals>
+                            <goal>deploy</goal>
+                        </goals>
+                        <!-- skip榛樿deploy鎻掍欢鐨勬墽琛� -->
+                        <configuration>
+                            <skip>true</skip>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>
diff --git a/deploy-jar-template/src/main/resources/application-dev.yml b/deploy-jar-template/src/main/resources/application-dev.yml
index 30d170d..cca4d14 100644
--- a/deploy-jar-template/src/main/resources/application-dev.yml
+++ b/deploy-jar-template/src/main/resources/application-dev.yml
@@ -8,7 +8,7 @@
 #    password: Bjjmy_63661766
     password: Bjjmy_2020
 #    driver-class-name: sunje.goldilocks.jdbc.GoldilocksDriver
-    url: jdbc:mysql://124.70.39.177:3306/train_recommend?useUnicode=true&characterEncoding=UTF-8&useSSL=false
+    url: jdbc:mysql://116.198.40.76:3306/train_recommend?useUnicode=true&characterEncoding=UTF-8&useSSL=false
     type: com.walker.jdbc.ds.DefaultDataSource
     hikari:
       minimum-idle: 5
@@ -64,7 +64,7 @@
   cache:
     redis-enabled: false
 
-  # 鐩镐技搴﹀垎鏋愭ā鍧椾娇鐢�
+  # 鐩镐技搴﹀垎鏋愭ā鍧椾娇鐢紙鏆傛椂搴熷純锛�
   similarity:
     # 鏄惁鍚敤鐩镐技搴︽ā鍧楋紝濡傛灉绂佺敤鍒欒纭繚娉ㄥ叆鏃舵敮鎸佷负绌�
     enabled: true
@@ -102,8 +102,15 @@
     test-mode: false
 
     #涓氬姟瑙嗛鎵�鍦ㄦ暟鎹簱淇℃伅
-    business-datasource-url: 124.70.39.177
+    business-datasource-url: 116.198.40.76
     business-datasource-port: 3306
-    business-datasource-service: train_test
+    business-datasource-service: train_zs
     business-datasource-authentication: root
     business-datasource-certification: Bjjmy_2020
+
+#sftp:
+#  host: 124.70.39.177
+#  port: 22
+#  user: mysftp
+#  pass: Bjjmy_2020
+#  base: /train
diff --git a/deploy-jar-template/src/main/resources/application-test.yml b/deploy-jar-template/src/main/resources/application-test.yml
new file mode 100644
index 0000000..4e9ba89
--- /dev/null
+++ b/deploy-jar-template/src/main/resources/application-test.yml
@@ -0,0 +1,117 @@
+spring:
+  application:
+    name: train_recommend
+  datasource:
+    # 鏄惁鏄剧ずdao涓墦鍗扮殑SQL璇彞
+    show-sql: true
+    username: root
+#    password: Bjjmy_63661766
+    password: Bjjmy_2020
+#    driver-class-name: sunje.goldilocks.jdbc.GoldilocksDriver
+    url: jdbc:mysql://116.198.40.76:3306/train_recommend?useUnicode=true&characterEncoding=UTF-8&useSSL=false
+    type: com.walker.jdbc.ds.DefaultDataSource
+    hikari:
+      minimum-idle: 5
+      idle-timeout: 600000
+      pool-name: databasePool_walker
+      connection-timeout: 10000
+      connection-test-query: select 1
+#    username: root
+#    password: SearunMaster@2019
+#    driver-class-name: com.mysql.cj.jdbc.Driver
+#    url: jdbc:mysql://193.193.193.236:3306/cpmsxc?serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false&failOverReadOnly=false
+
+#    username: GQCG
+#    password: GQCG
+#    driver-class-name: oracle.jdbc.OracleDriver
+#    url: jdbc:oracle:thin:@61.163.210.202:6021/orcl
+server:
+  port: 8082
+  servlet:
+    context-path: /
+    session:
+      timeout: 30m
+
+logging:
+  level:
+    root: info
+    org:
+      springframework: error
+    com:
+      walker: info
+      iplatform: debug
+
+#  file: # logging.file.path 鍜� logging.file.name锛屽彧浼氭湁涓�涓敓鏁堬紝閰嶄簡path涓嶈閰峮ame锛岄厤浜唍ame涓嶈閰峱ath锛屽彧閰峱ath鏃秐ame榛樿涓簊pring.log锛屾兂璺緞鍜屾枃浠跺悕鍚屾椂鐢熸晥鍙厤缃甽ogging.file.name=d:/logs/mylog.log
+#    name: ${spring.application.name}.log #鏃ュ織鏂囦欢鍚�
+#    path: logs  #鏃ュ織瀛樺偍璺緞
+#    max-history: 30 #淇濈暀澶氬皯澶╃殑鏃ュ織
+#    max-size: 10MB
+#  pattern:
+#    rolling-file-name: ${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz
+  logback:
+    rollingpolicy:
+#      file-name-pattern: ${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz
+      file-name-pattern: ${LOG_FILE}.%d{yyyy-MM-dd}.gz
+      max-history: 1
+      max-file-size: 2
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# 骞冲彴閰嶇疆鏀寔鍔熻兘
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+iplatform:
+
+  # 骞冲彴缂撳瓨锛屾槸鍚﹀惎鐢╮edis缂撳瓨锛岄粯璁や娇鐢ㄥ熀浜庡唴瀛樼紦瀛�.
+  # 娉ㄦ剰锛氬鏋滃紑鍚痳edis缂撳瓨锛屼笟鍔″伐绋嬪繀椤讳緷璧�(walker-support-redis)
+  cache:
+    redis-enabled: false
+
+  # 鐩镐技搴﹀垎鏋愭ā鍧椾娇鐢紙鏆傛椂搴熷純锛�
+  similarity:
+    # 鏄惁鍚敤鐩镐技搴︽ā鍧楋紝濡傛灉绂佺敤鍒欒纭繚娉ㄥ叆鏃舵敮鎸佷负绌�
+    enabled: true
+    milvus-host: 172.16.60.65
+    milvus-port: 19530
+    word-file: d:/dev_tools/ai/w2v_sogou_dim300_vocab.txt
+    embedding-file: d:/dev_tools/ai/w2v_sogou_dim300.npy
+
+  # 璋冨害鍣ㄦā鍧楋紝鏄惁鍚敤
+  scheduler:
+    enabled: true
+
+  # 鏁版嵁閲囬泦妯″潡
+  gather:
+    enabled: true
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# 涓氬姟鍔熻兘閰嶇疆鍙傛暟
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+recommend:
+
+  video:
+    # 瑙嗛閲囬泦瀛樺偍鏍硅矾寰�
+#    data-folder: D:/dev_tools/ai/
+    data-folder: /opt/ai/video/
+
+    # 瑙嗛鐩镐技搴I鏈嶅姟URL
+#    ai-service: http://121.36.40.27:12345
+    ai-service: http://127.0.0.1:12345
+
+    # 鎺ㄨ崘鐩镐技瑙嗛(绠楁硶)鍓嶅灏戜釜
+    top-n: 40
+
+    # 娴嬭瘯妯″紡锛屽鏋滄槸鍒欎粎鐢熸垚鍥哄畾娴嬭瘯鏁版嵁锛屾寮忛儴缃查渶瑕佹敼涓� false
+    test-mode: false
+
+    #涓氬姟瑙嗛鎵�鍦ㄦ暟鎹簱淇℃伅
+    business-datasource-url: 116.198.40.76
+    business-datasource-port: 3306
+    business-datasource-service: train_zs
+    business-datasource-authentication: root
+    business-datasource-certification: Bjjmy_2020
+
+#sftp:
+#  host: 116.198.40.76
+#  port: 22
+#  user: mysftp
+#  pass: Bjjmy_2020
+#  base: /train
\ No newline at end of file
diff --git a/deploy-jar-template/src/main/resources/sftp.properties b/deploy-jar-template/src/main/resources/sftp.properties
new file mode 100644
index 0000000..073cd90
--- /dev/null
+++ b/deploy-jar-template/src/main/resources/sftp.properties
@@ -0,0 +1,5 @@
+sftp.host=124.70.39.177
+sftp.port=22
+sftp.user=mysftp
+sftp.pass=Bjjmy_2020
+sftp.base=/train
diff --git a/recommend-video/src/main/java/com/iplatform/recvideo/config/VideoSimilarProperties.java b/recommend-video/src/main/java/com/iplatform/recvideo/config/VideoSimilarProperties.java
index e48823d..38d661b 100644
--- a/recommend-video/src/main/java/com/iplatform/recvideo/config/VideoSimilarProperties.java
+++ b/recommend-video/src/main/java/com/iplatform/recvideo/config/VideoSimilarProperties.java
@@ -23,6 +23,8 @@
 
     private String businessDatasourceCertification;
 
+
+
     public boolean isTestMode() {
         return testMode;
     }

--
Gitblit v1.9.1