application.yml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. # 项目相关配置
  2. ruoyi:
  3. # 名称
  4. name: RuoYi-Vue-Plus
  5. # 版本
  6. version: ${ruoyi-vue-plus.version}
  7. # 版权年份
  8. copyrightYear: 2023
  9. # 缓存懒加载
  10. cacheLazy: false
  11. captcha:
  12. # 页面 <参数设置> 可开启关闭 验证码校验
  13. # 验证码类型 math 数组计算 char 字符验证
  14. type: MATH
  15. # line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
  16. category: CIRCLE
  17. # 数字验证码位数
  18. numberLength: 1
  19. # 字符验证码长度
  20. charLength: 4
  21. # 开发环境配置
  22. server:
  23. # 服务器的HTTP端口,默认为8080
  24. port: 8989
  25. servlet:
  26. # 应用的访问路径
  27. context-path: /
  28. # undertow 配置
  29. undertow:
  30. # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
  31. max-http-post-size: -1
  32. # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
  33. # 每块buffer的空间大小,越小的空间被利用越充分
  34. buffer-size: 512
  35. # 是否分配的直接内存
  36. direct-buffers: true
  37. threads:
  38. # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
  39. io: 8
  40. # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
  41. worker: 256
  42. # 日志配置
  43. logging:
  44. level:
  45. com.ruoyi: @logging.level@
  46. org.springframework: warn
  47. config: classpath:logback-plus.xml
  48. # 用户配置
  49. user:
  50. password:
  51. # 密码最大错误次数
  52. maxRetryCount: 5
  53. # 密码锁定时间(默认10分钟)
  54. lockTime: 10
  55. # Spring配置
  56. spring:
  57. application:
  58. name: ${ruoyi.name}
  59. # 资源信息
  60. messages:
  61. # 国际化资源文件路径
  62. basename: i18n/messages
  63. profiles:
  64. active: @profiles.active@
  65. # 文件上传
  66. servlet:
  67. multipart:
  68. # 单个文件大小
  69. max-file-size: 10MB
  70. # 设置总上传的文件大小
  71. max-request-size: 20MB
  72. # 服务模块
  73. devtools:
  74. restart:
  75. # 热部署开关
  76. enabled: true
  77. mvc:
  78. format:
  79. date-time: yyyy-MM-dd HH:mm:ss
  80. jackson:
  81. # 日期格式化
  82. date-format: yyyy-MM-dd HH:mm:ss
  83. serialization:
  84. # 格式化输出
  85. indent_output: false
  86. # 忽略无法转换的对象
  87. fail_on_empty_beans: false
  88. deserialization:
  89. # 允许对象忽略json中不存在的属性
  90. fail_on_unknown_properties: false
  91. # Sa-Token配置
  92. sa-token:
  93. # token名称 (同时也是cookie名称)
  94. token-name: Authorization
  95. # token有效期 设为一天 (必定过期) 单位: 秒
  96. timeout: 86400
  97. # 多端不同 token 有效期 可查看 LoginHelper.loginByDevice 方法自定义
  98. # token最低活跃时间 (指定时间无操作就过期) 单位: 秒
  99. active-timeout: 36000
  100. # 允许动态设置 token 有效期
  101. dynamic-active-timeout: true
  102. # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
  103. is-concurrent: true
  104. # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
  105. is-share: false
  106. # 是否尝试从header里读取token
  107. is-read-header: true
  108. # 是否尝试从cookie里读取token
  109. is-read-cookie: false
  110. # token前缀
  111. token-prefix: "Bearer"
  112. # jwt秘钥
  113. jwt-secret-key: abcdefghijklmnopqrstuvwxyz
  114. # security配置
  115. security:
  116. # 排除路径
  117. excludes:
  118. # 静态资源
  119. - /*.html
  120. - /**/*.html
  121. - /**/*.css
  122. - /**/*.js
  123. # 公共路径
  124. - /favicon.ico
  125. - /error
  126. # swagger 文档配置
  127. - /*/api-docs
  128. - /*/api-docs/**
  129. # actuator 监控配置
  130. - /actuator
  131. - /actuator/**
  132. - /data/device/faultList
  133. - /data/device/deviceList
  134. - /data/device/allSensorStatus
  135. # MyBatisPlus配置
  136. # https://baomidou.com/config/
  137. mybatis-plus:
  138. # 不支持多包, 如有需要可在注解配置 或 提升扫包等级
  139. # 例如 com.**.**.mapper
  140. mapperPackage: com.ruoyi.**.mapper
  141. # 对应的 XML 文件位置
  142. mapperLocations: classpath*:mapper/**/*Mapper.xml
  143. # 实体扫描,多个package用逗号或者分号分隔
  144. typeAliasesPackage: com.ruoyi.**.domain
  145. # 启动时是否检查 MyBatis XML 文件的存在,默认不检查
  146. checkConfigLocation: false
  147. configuration:
  148. # 自动驼峰命名规则(camel case)映射
  149. mapUnderscoreToCamelCase: true
  150. # MyBatis 自动映射策略
  151. # NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
  152. autoMappingBehavior: PARTIAL
  153. # MyBatis 自动映射时未知列或未知属性处理策
  154. # NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
  155. autoMappingUnknownColumnBehavior: NONE
  156. # 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
  157. # 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
  158. # 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
  159. logImpl: org.apache.ibatis.logging.nologging.NoLoggingImpl
  160. global-config:
  161. # 是否打印 Logo banner
  162. banner: true
  163. dbConfig:
  164. # 主键类型
  165. # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUI 唯一 UUIDD
  166. idType: ASSIGN_ID
  167. # 逻辑已删除值
  168. logicDeleteValue: 2
  169. # 逻辑未删除值
  170. logicNotDeleteValue: 0
  171. # 字段验证策略之 insert,在 insert 的时候的字段验证策略
  172. # IGNORED 忽略 NOT_NULL 非NULL NOT_EMPTY 非空 DEFAULT 默认 NEVER 不加入 SQL
  173. insertStrategy: NOT_NULL
  174. # 字段验证策略之 update,在 update 的时候的字段验证策略
  175. updateStrategy: NOT_NULL
  176. # 字段验证策略之 select,在 select 的时候的字段验证策略既 wrapper 根据内部 entity 生成的 where 条件
  177. where-strategy: NOT_NULL
  178. # 数据加密
  179. mybatis-encryptor:
  180. # 是否开启加密
  181. enable: false
  182. # 默认加密算法
  183. algorithm: BASE64
  184. # 编码方式 BASE64/HEX。默认BASE64
  185. encode: BASE64
  186. # 安全秘钥 对称算法的秘钥 如:AES,SM4
  187. password:
  188. # 公私钥 非对称算法的公私钥 如:SM2,RSA
  189. publicKey:
  190. privateKey:
  191. springdoc:
  192. api-docs:
  193. # 是否开启接口文档
  194. enabled: true
  195. # swagger-ui:
  196. # # 持久化认证数据
  197. # persistAuthorization: true
  198. info:
  199. # 标题
  200. title: '标题:${ruoyi.name}后台管理系统_接口文档'
  201. # 描述
  202. description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...'
  203. # 版本
  204. version: '版本号: ${ruoyi-vue-plus.version}'
  205. # 作者信息
  206. contact:
  207. name: Lion Li
  208. email: crazylionli@163.com
  209. url: https://gitee.com/dromara/RuoYi-Vue-Plus
  210. components:
  211. # 鉴权方式配置
  212. security-schemes:
  213. apiKey:
  214. type: APIKEY
  215. in: HEADER
  216. name: ${sa-token.token-name}
  217. #这里定义了两个分组,可定义多个,也可以不定义
  218. group-configs:
  219. - group: 1.演示模块
  220. packages-to-scan: com.ruoyi.demo
  221. - group: 2.系统模块
  222. packages-to-scan: com.ruoyi.web
  223. - group: 3.代码生成模块
  224. packages-to-scan: com.ruoyi.generator
  225. # 防止XSS攻击
  226. xss:
  227. # 过滤开关
  228. enabled: true
  229. # 排除链接(多个用逗号分隔)
  230. excludes: /system/notice
  231. # 匹配链接
  232. urlPatterns: /system/*,/monitor/*,/tool/*
  233. # 全局线程池相关配置
  234. thread-pool:
  235. # 是否开启线程池
  236. enabled: false
  237. # 队列最大长度
  238. queueCapacity: 128
  239. # 线程池维护线程所允许的空闲时间
  240. keepAliveSeconds: 300
  241. --- # 分布式锁 lock4j 全局配置
  242. lock4j:
  243. # 获取分布式锁超时时间,默认为 3000 毫秒
  244. acquire-timeout: 3000
  245. # 分布式锁的超时时间,默认为 30 秒
  246. expire: 30000
  247. --- # Actuator 监控端点的配置项
  248. management:
  249. endpoints:
  250. web:
  251. exposure:
  252. include: '*'
  253. endpoint:
  254. health:
  255. show-details: ALWAYS
  256. logfile:
  257. external-file: ./logs/sys-console.log
  258. mqtt:
  259. url: ${MQTT_URL:tcp://58.252.235.18:1883}
  260. clientid: iotc_server
  261. user: ${MQTT_USER:iotc}
  262. password: ${MQTT_PWD:iotc}
  263. topic: ${MQTT_TOPIC:/sensor/#}
  264. saveAndForward: ${DATASAVE:false}