Blame view

src/main/resources/application.yml 4.46 KB
1
2
spring:
  profiles:
3
    active: druid
4
---
5
6
#项目相关配置
#名称
7
8
huaheng:
  name: huaheng
9
  #版本
10
  version: 4.0.0
11
  #版权年份
12
  copyrightYear: 2018
13
  # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
周峰 authored
14
  profile: D:/Huaheng/uploadPath/
15
  # 获取ip地址开关
16
17
  addressEnabled: false
18
#测试服务端口、测试项目contextPath
19
20
21
server:
  tomcat:
    uri-encoding: UTF-8
22
    # tomcat最大线程数,默认为200
23
    max-threads: 800
24
    # Tomcat启动初始化的线程数,默认值25
25
    min-spare-threads: 30
26
27
28
29
30
31
32
33
34
35
  undertow:
    # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
    io-threads: 4
    # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
    worker-threads: 20
    # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
    # 每块buffer的空间大小,越小的空间被利用越充分
    buffer-size: 1024
    # 是否分配的直接内存
    direct-buffers: true
36
37
# 用户配置
38
39
user:
  password:
40
    # 密码错误{maxRetryCount}次锁定10分钟
41
42
    maxRetryCount: 5
43
# Spring配置
44
spring:
45
46
47
48
  mvc:
    static-path-pattern: /**
  resources:
    static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${huaheng.profile}
49
50
51
52
53
  http:
    encoding:
      charset: utf-8
      enabled: true
      force: true
54
  # 模板引擎
55
56
57
  thymeleaf:
    mode: HTML
    encoding: utf-8
58
    # 禁用缓存
59
    cache: false
60
  #国际化资源文件路径
61
62
63
64
65
66
67
  messages:
    basename: i18n/messages
  jackson:
    time-zone: GMT+8
    date-format: yyyy-MM-dd HH:mm:ss
  profiles:
    active: druid
mahuandong authored
68
    property-naming-strategy: LOWER_CAMEL_CASE
69
  # 文件上传
70
71
  servlet:
    multipart:
72
      # 单个文件大小
73
      max-file-size:  30MB
74
      # 设置总上传的文件大小
75
      max-request-size:  30MB
76
  # 服务模块
77
78
  devtools:
    restart:
79
      # 热部署开关
80
      enabled: true
mahuandong authored
81
82
83
84
85
86
87
88
89
90
  # 邮箱配置
  mail:
    # 邮箱服务器
    host: smtp.qq.com
    # 邮箱账号
    username: 752432958@qq.com
    # 邮箱密码
    password: owobzjvlgsxrbdfe
    # 编码类型
    default-encoding: utf-8
mahuandong authored
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
  # redis 配置
  redis:
    # 地址
    host: localhost
    # 端口,默认为6379
    port: 6379
    # 密码
    password:
    # 连接超时时间
    timeout: 10s
    lettuce:
      pool:
        # 连接池中的最小空闲连接
        min-idle: 0
        # 连接池中的最大空闲连接
        max-idle: 8
        # 连接池的最大数据库连接数
        max-active: 8
        # #连接池最大阻塞等待时间(使用负值表示没有限制)
        max-wait: -1ms
111
112
113
114

mybatis-plus:
  mapper-locations: classpath:mybatis/**/*.xml
  type-aliases-package: com.huaheng.pc.**.**.domain
xqs authored
115
116
117
118
  global-config:
    db-config:
      logic-delete-value: 0 # 逻辑已删除值(默认为 1)
      logic-not-delete-value: 1 # 逻辑未删除值(默认为 0)
119
120
# PageHelper分页插件
121
122
123
124
125
126
127
128
129
pagehelper:
  helperDialect: mysql
  reasonable: true
  supportMethodsArguments: true
  params: count=countSql

# Shiro
shiro:
  user:
130
    # 登录地址
131
    loginUrl: /login
132
    # 权限认证失败地址
133
    unauthorizedUrl: /unauth
134
    # 首页地址
135
    indexUrl: /index
136
    # 验证码开关
137
    captchaEnabled: false
138
    # 验证码类型 math 数组计算 char 字符
139
140
    captchaType: math
  cookie:
141
    # 设置Cookie的域名 默认空,即当前访问的域名
142
    domain:
143
    # 设置cookie的有效访问路径
144
    path: /
145
    # 设置HttpOnly属性
146
    httpOnly: true
147
    # 设置Cookie的过期时间,天为单位
148
    maxAge: -1
149
  session:
150
    # Session超时时间(默认30分钟)
151
    expireTime: -1
152
    # 同步session到数据库的周期(默认1分钟)
153
    dbSyncPeriod: 1
154
    # 相隔多久检查一次session的有效性,默认就是10分钟
155
156
    validationInterval: 10
157
# 防止XSS攻击
158
xss:
159
  # 过滤开关
160
  enabled: true
161
  # 排除链接(多个用逗号分隔)
162
  excludes: /system/notice/*
163
  # 匹配链接
164
165
  urlPatterns: /system/*,/monitor/*,/tool/*
166
167
    # 代码生成
    # 作者
168
169
gen:
  author: huaheng
170
  # 默认生成包路径 module 需改成自己的模块名称 如 system monitor tool
171
  packageName: com.huaheng.pc.task
172
  # 自动去除表前缀,默认是true
173
  autoRemovePre: false
174
  # 表前缀(类名不会包含表前缀)
mahuandong authored
175
  gen.tablePrefix: sys_