wanglizhong
2025-05-10 34044707d97b6396325c7fc4cac8d889fae96f85
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# 生产环境配置
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