application.yml 5.6 KB
# 开发环境配置
server:
  # 服务器的HTTP端口,默认为8080
  port: 8064
  servlet:
    # 应用的访问路径
    context-path: /
  tomcat:
    # tomcat的URI编码
    uri-encoding: UTF-8
    # 连接数满后的排队数,默认为100
    accept-count: 1000
    threads:
      # tomcat最大线程数,默认为200
      max: 800
      # Tomcat启动初始化的线程数,默认值10
      min-spare: 100


# 日志配置
logging:
  level:
    com.ruoyi: debug
    org.springframework: warn

# Swagger配置
swagger:
  # 是否开启swagger
  enabled: true
  # 请求前缀
  pathMapping: /dev-api

# 防止XSS攻击
xss:
  # 过滤开关
  enabled: true
  # 排除链接(多个用逗号分隔)
  excludes: /system/notice
  # 匹配链接
  urlPatterns: /system/*,/monitor/*,/tool/*

sys:
  staticPath: "file:E:/work/idea/Luhui/lh-modules/lh-smart-feeder/src/main/resources/static/"
  cacheFilePath: "E:/work/idea/Luhui/lh-modules/lh-smart-feeder/cache/"

# MyBatis配置
mybatis:
  # 搜索指定包别名
  typeAliasesPackage: com.ruoyi.**.domain,com.zhonglai.**.domain
  # 配置mapper的扫描,找到所有的mapper.xml映射文件
  mapperLocations: classpath*:mapper/**/*Mapper.xml
  # 加载全局的配置文件
  configLocation: classpath:mybatis/mybatis-config.xml


# 数据源配置
spring:
  autoconfigure:
    exclude: org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration
  datasource:
    type: com.alibaba.druid.pool.DruidDataSource
    driverClassName: org.sqlite.JDBC
    druid:
      # 主库数据源
      master:
        url: jdbc:sqlite:db/my.db
        username:
        password:
      # 从库数据源
      slave:
        # 从数据源开关/默认关闭
        enabled: false
        url:
        username:
        password:
      # 初始连接数
      initialSize: 5
      # 最小连接池数量
      minIdle: 10
      # 最大连接池数量
      maxActive: 20
      # 配置获取连接等待超时的时间
      maxWait: 60000
      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
      timeBetweenEvictionRunsMillis: 60000
      # 配置一个连接在池中最小生存的时间,单位是毫秒
      minEvictableIdleTimeMillis: 300000
      # 配置一个连接在池中最大生存的时间,单位是毫秒
      maxEvictableIdleTimeMillis: 900000
      # 配置检测连接是否有效
      validationQuery: SELECT 1
      testWhileIdle: true
      testOnBorrow: false
      testOnReturn: false
      webStatFilter:
        enabled: true
      statViewServlet:
        enabled: true
        # 设置白名单,不填则允许所有访问
        allow:
        url-pattern: /druid/*
        # 控制台管理用户名和密码
        login-username: ruoyi
        login-password: 123456
      filter:
        stat:
          enabled: true
          # 慢SQL记录
          log-slow-sql: true
          slow-sql-millis: 1000
          merge-sql: true
        wall:
          config:
            multi-statement-allow: true

## 数据源配置
#spring:
#  datasource:
#    type: com.alibaba.druid.pool.DruidDataSource
#    driverClassName: com.mysql.cj.jdbc.Driver
#    druid:
#      # 主库数据源
#      master:
#        url: jdbc:mysql://rm-wz9740un21f09iokuao.mysql.rds.aliyuncs.com:3306/mqtt_broker?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
#        username: luhui
#        password: Luhui586
#      # 从库数据源
#      slave:
#        # 从数据源开关/默认关闭
#        enabled: true
#        url: jdbc:mysql://119.23.218.181:3306/lh-server-ops?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
#        username: luhui
#        password: Luhui586
#      # 初始连接数
#      initialSize: 5
#      # 最小连接池数量
#      minIdle: 10
#      # 最大连接池数量
#      maxActive: 20
#      # 配置获取连接等待超时的时间
#      maxWait: 60000
#      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
#      timeBetweenEvictionRunsMillis: 60000
#      # 配置一个连接在池中最小生存的时间,单位是毫秒
#      minEvictableIdleTimeMillis: 300000
#      # 配置一个连接在池中最大生存的时间,单位是毫秒
#      maxEvictableIdleTimeMillis: 900000
#      # 配置检测连接是否有效
#      validationQuery: SELECT 1 FROM DUAL
#      testWhileIdle: true
#      testOnBorrow: false
#      testOnReturn: false
#      webStatFilter:
#        enabled: true
#      statViewServlet:
#        enabled: true
#        # 设置白名单,不填则允许所有访问
#        allow:
#        url-pattern: /druid/*
#        # 控制台管理用户名和密码
#        login-username: ruoyi
#        login-password: 123456
#      filter:
#        stat:
#          enabled: true
#          # 慢SQL记录
#          log-slow-sql: true
#          slow-sql-millis: 1000
#          merge-sql: true
#        wall:
#          config:
#            multi-statement-allow: true

mqtt:
  #链接地址
  broker: tcp://175.24.61.68:1883
  #唯一标识
  clientId: 70094a59d1d991d
  #公司id
  roleid: 2
  mqtt_usernames: NWDB_2023
  #订阅的topic
  topics: ADD_POST,ALL_POST,DB_TOPIC_DISTRIBUTE,GET/+,online,PUT_REQ/+,READ_REQ/+
  sub_clientid: '70094a59d1d991d'
  topicconfig: "/{{roleid}}/{{username}}/{{clientid}}/{{payloadtype}}/{{topicType}}/{{messageid}}"
  top_return_map: '{"PUT":"PUT_REQ","READ":"READ_REQ"}'
  username: sysuser
  password: "!@#1qaz"
  client:
    #客户端操作时间
    operationTime: 10