shikeying
2022-10-27 f92600ec2835c9ad48b5f20d2ca18cf25931ff44
添加测试配置部署
2个文件已添加
3个文件已修改
173 ■■■■■ 已修改文件
deploy-jar-template/pom.xml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-template/src/main/resources/application-dev.yml 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-template/src/main/resources/application-test.yml 117 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy-jar-template/src/main/resources/sftp.properties 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
recommend-video/src/main/java/com/iplatform/recvideo/config/VideoSimilarProperties.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
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
deploy-jar-template/src/main/resources/application-test.yml
New file
@@ -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不要配name,配了name不要配path,只配path时name默认为spring.log,想路径和文件名同时生效可配置logging.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:
  # 平台缓存,是否启用redis缓存,默认使用基于内存缓存.
  # 注意:如果开启redis缓存,业务工程必须依赖(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/
    # 视频相似度AI服务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
deploy-jar-template/src/main/resources/sftp.properties
New file
@@ -0,0 +1,5 @@
sftp.host=124.70.39.177
sftp.port=22
sftp.user=mysftp
sftp.pass=Bjjmy_2020
sftp.base=/train
recommend-video/src/main/java/com/iplatform/recvideo/config/VideoSimilarProperties.java
@@ -23,6 +23,8 @@
    private String businessDatasourceCertification;
    public boolean isTestMode() {
        return testMode;
    }