application.yml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. server:
  2. port: 8086
  3. spring:
  4. servlet:
  5. multipart:
  6. enabled: true
  7. max-file-size: 10MB
  8. max-request-size: 12MB
  9. #注: 切换数据库时需要将项目根目录中的.init文件删除再重启
  10. # <<=======内置H2数据库连接设置开始==========
  11. jpa:
  12. show-sql: true
  13. hibernate:
  14. ddl-auto: update
  15. properties:
  16. hibernate:
  17. format_sql: true
  18. sql:
  19. init:
  20. # schema-locations: classpath:sql/schema.sql
  21. schema-locations: classpath:sql/schema-postgre.sql
  22. mode: ALWAYS
  23. # datasource:
  24. # url: jdbc:h2:./data/iotkit;MODE=MySQL
  25. # username: sa
  26. # password: 123456
  27. # driverClassName: org.h2.Driver
  28. # type: com.zaxxer.hikari.HikariDataSource
  29. # # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  30. # dynamic:
  31. # hikari:
  32. # connection-timeout: 5000
  33. # idle-timeout: 30000 # 经过idle-timeout时间如果连接还处于空闲状态, 该连接会被回收
  34. # min-idle: 5 # 池中维护的最小空闲连接数, 默认为 10 个
  35. # max-pool-size: 16 # 池中最大连接数, 包括闲置和使用中的连接, 默认为 10 个
  36. # max-lifetime: 60000 # 如果一个连接超过了时长,且没有被使用, 连接会被回收
  37. # is-auto-commit: true
  38. # primary: master #设置默认的数据源或者数据源组,默认值即为master
  39. # strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
  40. # datasource:
  41. # # 主库数据源
  42. # master:
  43. # type: ${spring.datasource.type}
  44. # driverClassName: org.h2.Driver
  45. # # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  46. # # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  47. # url: jdbc:h2:./data/iotkit;MODE=MySQL
  48. # username: sa
  49. # password: 123456
  50. # # 从库数据源
  51. # slave:
  52. # lazy: true
  53. # type: ${spring.datasource.type}
  54. # driverClassName: org.h2.Driver
  55. # url: jdbc:h2:./data/iotkit;MODE=MySQL
  56. # username: sa
  57. # password: 123456
  58. #
  59. # # 内置h2 web console设置
  60. # platform: h2
  61. # h2:
  62. # console:
  63. # enabled: true
  64. # path: /h2
  65. # settings:
  66. # web-allow-others: true
  67. #=======内置H2数据库连接设置结束==========>>
  68. # <<==========mysql配置开始==============
  69. # datasource:
  70. # url: jdbc:mysql://127.0.0.1:3306/iotkit?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&useSSL=false
  71. # driverClassName: com.mysql.cj.jdbc.Driver
  72. # username: root
  73. # password: 123456
  74. # validationQuery: SELECT 1
  75. # testOnBorrow: true
  76. # jpa:
  77. # database: MySQL
  78. # database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
  79. ## show-sql: true
  80. # hibernate:
  81. # ddl-auto: update
  82. # properties:
  83. # hibernate:
  84. # format_sql: true
  85. # ============mysql配置结束============>>
  86. #<<================es时序数据配置开始===============
  87. elasticsearch:
  88. rest:
  89. #使用内置es的配置
  90. #uris: http://elasticsearch:9200
  91. uris: http://127.0.0.1:9200
  92. username:
  93. password:
  94. connection-timeout: 10s
  95. #================es时序数据配置结束===============>>
  96. #<<===========tdengine时序数据库配置开始============
  97. # td-datasource:
  98. # url: jdbc:TAOS-RS://127.0.0.1:6041/iotkit?timezone=UTC-8&charset=UTF-8&locale=en_US.UTF-8
  99. # username: root
  100. # password: taosdata
  101. # driverClassName: com.taosdata.jdbc.rs.RestfulDriver
  102. #===========tdengine时序数据库配置开始============>>
  103. redis:
  104. #使用内置redis的配置
  105. #host: redis
  106. host: 127.0.0.1
  107. port: 6379
  108. database: 0
  109. mvc:
  110. pathmatch:
  111. matching-strategy: ant_path_matcher
  112. # profiles:
  113. # active: mysql
  114. #application.yml中打开注释支持rocketMq作为消息总线,pom.xml中打开注释使用rocketmq消息总线
  115. #rocketmq:
  116. # name-server: 172.16.1.113:9876
  117. # producer:
  118. # group: iotkit
  119. #图片存储用的是阿里云oss,如果需要上传产品图片才需要配置
  120. aliyun:
  121. bucketId:
  122. endpoint:
  123. accessKeyId:
  124. accessKeySecret:
  125. sa-token:
  126. # token名称 (同时也是cookie名称)
  127. token-name: token
  128. # token有效期,单位s 默认30天, -1代表永不过期
  129. timeout: 2592000
  130. # token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
  131. activity-timeout: -1
  132. # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
  133. is-concurrent: true
  134. # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
  135. is-share: false
  136. # token风格
  137. token-style: uuid
  138. # 是否输出操作日志
  139. is-log: false
  140. captcha:
  141. enable: true
  142. # 页面 <参数设置> 可开启关闭 验证码校验
  143. # 验证码类型 math 数组计算 char 字符验证
  144. type: MATH
  145. # line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
  146. category: CIRCLE
  147. # 数字验证码位数
  148. numberLength: 1
  149. # 字符验证码长度
  150. charLength: 4
  151. # 用户配置
  152. user:
  153. password:
  154. # 密码最大错误次数
  155. maxRetryCount: 5
  156. # 密码锁定时间(默认10分钟)
  157. lockTime: 10
  158. # openapi配置
  159. openapi:
  160. appid: 123456789
  161. password: 123456
  162. oss:
  163. region: xxxxx
  164. endpoint: xxxxx
  165. accessKey: xxxxx
  166. secretKey: xxxxx
  167. buckName: xxxx
  168. baetyl:
  169. api-type: feign
  170. service-url: http://116.168.30.140:30004
  171. # MyBatisPlus配置
  172. # https://baomidou.com/config/
  173. mybatis-plus:
  174. # 不支持多包, 如有需要可在注解配置 或 提升扫包等级
  175. # 例如 com.**.**.mapper
  176. mapperPackage: cc.iotkit.**.mapper
  177. # 对应的 XML 文件位置
  178. mapperLocations: classpath*:mapper/**/*Mapper.xml
  179. # 实体扫描,多个package用逗号或者分号分隔
  180. typeAliasesPackage: cc.iotkit.**.domain
  181. global-config:
  182. dbConfig:
  183. # 主键类型
  184. # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
  185. # 如需改为自增 需要将数据库表全部设置为自增
  186. idType: ASSIGN_ID