application-local.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # 完整的外挂配置文件,修改配置无需重新打包
  2. # 运行命令:java -jar yf-exam-api.jar --spring.config.location=application-local.yml
  3. server:
  4. port: 8101
  5. # 启用服务端压缩
  6. compression:
  7. enabled: true
  8. min-response-size: 10
  9. mime-types: application/json,application/xml,text/html,text/xml,text/plain,application/javascript,text/css
  10. spring:
  11. application:
  12. name: yf-exam-api
  13. profiles:
  14. active: dev
  15. main:
  16. allow-bean-definition-overriding: true
  17. # 数据库配置
  18. datasource:
  19. type: com.alibaba.druid.pool.DruidDataSource
  20. driver-class-name: com.mysql.cj.jdbc.Driver
  21. url: jdbc:mysql://127.0.0.1:3306/yf_exam?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
  22. username: root
  23. password: root
  24. filters: stat
  25. max-active: 1000
  26. initial-size: 10
  27. max-wait: 6000
  28. min-idle: 1
  29. time-between-eviction-runs-millis: 60000
  30. min-evictable-idle-time-millis: 300000
  31. test-while-idle: true
  32. test-on-borrow: false
  33. test-on-return: false
  34. pool-prepared-statements: true
  35. max-open-prepared-statements: 1000
  36. async-init: true
  37. # Redis配置
  38. redis:
  39. database: 0
  40. host: 127.0.0.1
  41. port: 6379
  42. password:
  43. timeout: 5000
  44. # 定时任务配置
  45. quartz:
  46. #数据库方式
  47. job-store-type: jdbc
  48. # quartz 相关属性配置
  49. properties:
  50. org:
  51. quartz:
  52. scheduler:
  53. instanceName: examScheduler
  54. instanceId: AUTO
  55. jobStore:
  56. class: org.quartz.impl.jdbcjobstore.JobStoreTX
  57. driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
  58. tablePrefix: QRTZ_
  59. isClustered: true
  60. clusterCheckinInterval: 10000
  61. useProperties: false
  62. threadPool:
  63. class: org.quartz.simpl.SimpleThreadPool
  64. threadCount: 10
  65. threadPriority: 5
  66. threadsInheritContextClassLoaderOfInitializingThread: true
  67. # 文档转换,请先安装LibreOffice,再配置相应路径,enabled=true
  68. jodconverter:
  69. local:
  70. enabled: false
  71. office-home: /opt/libreoffice6.4
  72. max-tasks-per-process: 10
  73. port-numbers: 8100
  74. # 基础配置
  75. ycloud:
  76. # 运行模式,ture为演示/false为正式
  77. demo: false
  78. # false运行多处登录,true为T下线
  79. login-tick: false
  80. # 微信登录成功以后,将token推送到这个链接同步登录
  81. login-sync-pc: https://youdomain.com/#/sync/{token}/{roleType}
  82. # 微信登录成功以后,将token推送到这个链接同步登录
  83. login-sync-h5: https://youdomain.com/#/pages/login/sync?token={token}
  84. # 微信获取code以后回调此URL
  85. login-redirect: https://youdomain.com/api/common/wx/redirect
  86. # 微信相关配置
  87. wechat:
  88. login:
  89. # 小程序登录appId
  90. mp-app-id:
  91. mp-app-secret:
  92. # 网站登录appId
  93. site-app-id:
  94. site-app-secret:
  95. # 生产环境建议关闭文档
  96. # 文档访问地址:http://localhost:8101/doc.html
  97. swagger:
  98. enable: false
  99. logging:
  100. level:
  101. root: error
  102. # 日志文件目录
  103. path: logs/${spring.application.name}/