xushili пре 2 година
родитељ
комит
c3f2c01181

+ 1 - 0
exam-06173-api/src/main/java/com/gyee/exam/ability/upload/provides/local/service/impl/LocalUpServiceImpl.java

@@ -130,6 +130,7 @@ public class LocalUpServiceImpl implements LocalUpService {
             Tika tika = new Tika();
             String mimeType = tika.detect(file);
             response.setContentType(mimeType);
+            response.addHeader("Accept-Ranges","bytes");
             response.setContentLength((int)file.length());
 
             is = new FileInputStream(filePath);

+ 4 - 4
exam-06173-api/src/main/resources/application-dev.yml

@@ -5,9 +5,9 @@ spring:
     type: com.alibaba.druid.pool.DruidDataSource
     driver-class-name: com.mysql.cj.jdbc.Driver
     #国电考培服务器
-    url: jdbc:mysql://10.155.32.18:3306/yf_exam?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true
+    #url: jdbc:mysql://10.155.32.18:3306/yf_exam?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true
     #华为云
-    #url: jdbc:mysql://124.70.18.168:3306/yf_exam?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true
+    url: jdbc:mysql://124.70.18.168:3306/yf_exam?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true
     username: root
     password: 123456
     filters: stat
@@ -28,9 +28,9 @@ spring:
   redis:
     database: 0
     #国电考培服务器
-    host: 10.155.32.18
+    #host: 10.155.32.18
     #华为云
-    #host: 124.70.18.168
+    host: 124.70.18.168
     port: 6379
     password: gdnxfd123
     timeout: 5000

+ 96 - 0
exam-06173-api/src/main/resources/application-hwy.yml

@@ -0,0 +1,96 @@
+spring:
+  # 数据库配置
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    #华为云
+    url: jdbc:mysql://124.70.18.168:3306/yf_exam?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true
+    username: root
+    password: 123456
+    filters: stat
+    max-active: 5000
+    initial-size: 20
+    max-wait: 6000
+    min-idle: 1
+    time-between-eviction-runs-millis: 60000
+    min-evictable-idle-time-millis: 300000
+    test-while-idle: true
+    test-on-borrow: false
+    test-on-return: false
+    pool-prepared-statements: true
+    max-open-prepared-statements: 1000
+    async-init: true
+
+  # Redis配置
+  redis:
+    database: 0
+    #华为云
+    host: 124.70.18.168
+    port: 6379
+    password: gdnxfd123
+    timeout: 5000
+
+  # 定时任务配置
+  quartz:
+    #数据库方式
+    job-store-type: jdbc
+    # quartz 相关属性配置
+    properties:
+      org:
+        quartz:
+          scheduler:
+            instanceName: examScheduler
+            instanceId: AUTO
+          jobStore:
+            class: org.quartz.impl.jdbcjobstore.JobStoreTX
+            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+            tablePrefix: qrtz_
+            isClustered: true
+            clusterCheckinInterval: 10000
+            useProperties: false
+          threadPool:
+            class: org.quartz.simpl.SimpleThreadPool
+            threadCount: 10
+            threadPriority: 5
+            threadsInheritContextClassLoaderOfInitializingThread: true
+
+
+# 文档转换
+jodconverter:
+  local:
+    enabled: true
+    office-home: C:\Program Files\LibreOffice
+    max-tasks-per-process: 10
+    port-numbers: 8100
+
+# 基础配置
+ycloud:
+  # 运行模式,ture为演示/false为正式
+  demo: false
+  # false允许用户多处登录,true为T下线
+  login-tick: false
+  # 微信登录成功以后,将token推送到这个链接同步登录
+  login-sync-pc: https://exam.yfhl.net/#/sync/{token}/{roleType}
+  # 微信登录成功以后,将token推送到这个链接同步登录
+  login-sync-h5: https://exam-m.yfhl.net/#/pages/login/sync?token={token}
+  # 微信获取code以后回调此URL
+  login-redirect: https://exam.yfhl.net/api/common/wx/redirect
+
+# 微信相关配置
+wechat:
+  login:
+    # 小程序登录appId
+    mp-app-id:
+    mp-app-secret:
+    # 网站登录appId
+    site-app-id:
+    site-app-secret:
+
+# 开启文档
+swagger:
+  enable: true
+
+logging:
+  level:
+    root: debug
+  path: logs/${spring.application.name}/

+ 1 - 1
exam-06173-api/src/main/resources/application.yml

@@ -2,7 +2,7 @@ spring:
   application:
     name: gyee-exam-api
   profiles:
-      active: uat
+      active: hwy
   main:
     allow-bean-definition-overriding: true
 server: