# 生产环境配置 server: # 服务器的HTTP端口 port: 8080 servlet: # 应用的访问路径 context-path: / tomcat: # tomcat的URI编码 uri-encoding: UTF-8 # 连接数满后的排队数,默认值100 accept-count: 1000 threads: # tomcat最大线程数,默认为200 max: 800 # Tomcat启动初始化的线程数,默认值25 min-spare: 30 # Spring配置 spring: # 数据源配置 datasource: type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.cj.jdbc.Driver druid: # 主库数据源 master: url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: password # 从库数据源 slave: # 从数据源开关/默认关闭 enabled: false url: username: password: # 初始连接数 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: # 开启stat拦截 enabled: true statViewServlet: # 开启druid监控 enabled: true # 访问路径为/druid/* url-pattern: /druid/* # 是否允许清空统计数据 reset-enable: false # 设置访问的用户名 login-username: admin # 设置访问的密码 login-password: 123456 filter: stat: # 开启慢sql记录 slow-sql-enabled: true # 慢sql时间 log-slow-sql: true # 合并sql merge-sql: true wall: config: # 不允许删除表 drop-table-allow: false # 不允许删除数据 delete-allow: false # 不允许删除数据库 delete-allow: false # 不允许删除数据库 drop-table-allow: false # 文件上传 配置 servlet: multipart: # 单个文件大小 max-file-size: 10MB # 设置总上传的文件大小 max-request-size: 20MB # 服务模块 devtools: restart: # 热部署开关 enabled: false # 定时任务配置 quartz: # 是否启用定时任务 enabled: true # 定时任务线程池配置 properties: org: quartz: threadPool: threadCount: 5 threadPriority: 5 threadsInheritContextClassLoaderOfInitializingThread: true jobStore: class: org.quartz.simpl.RAMJobStore scheduler: instanceName: clusteredScheduler instanceId: AUTO # MyBatis Plus配置 mybatis-plus: # 搜索指定包别名 typeAliasesPackage: com.ruoyi.**.domain # 配置mapper的扫描,找到所有的mapper.xml映射文件 mapperLocations: classpath*:mapper/**/*Mapper.xml # 加载全局的配置文件 configLocation: classpath:mybatis/mybatis-config.xml # PageHelper分页插件 pagehelper: pagehelper: # 分页参数合理化 reasonable: true # 支持通过Mapper接口参数来传递分页参数 supportMethodsArguments: true # 分页插件会自动检测当前的数据库链接 helperDialect: mysql # Swagger配置 swagger: # 是否开启swagger enabled: false # 请求前缀 pathMapping: / # 防止XSS攻击 xss: # 过滤开关 enabled: true # 排除链接(多个用逗号分隔) excludes: /system/notice # 匹配链接 urlPatterns: /system/*,/monitor/*,/tool/* # 日志配置 logging: level: com.ruoyi: info org.springframework: warn # 第三方接口配置 min: apiUrl: http://localhost:8080