162 lines
5.3 KiB
YAML
162 lines
5.3 KiB
YAML
|
|
# Tomcat
|
|||
|
|
server:
|
|||
|
|
# 应用服务 WEB 访问端口
|
|||
|
|
port: 8088
|
|||
|
|
servlet:
|
|||
|
|
context-path: /chat-master
|
|||
|
|
tomcat:
|
|||
|
|
# tomcat的URI编码
|
|||
|
|
uri-encoding: UTF-8
|
|||
|
|
# 连接数满后的排队数,默认为100
|
|||
|
|
accept-count: 1000
|
|||
|
|
threads:
|
|||
|
|
# tomcat最大线程数,默认为200
|
|||
|
|
max: 800
|
|||
|
|
# Tomcat启动初始化的线程数,默认值10
|
|||
|
|
min-spare: 100
|
|||
|
|
# 请求头内容大小
|
|||
|
|
max-http-header-size: 102400
|
|||
|
|
# Actuator Web 访问端口
|
|||
|
|
management:
|
|||
|
|
endpoints:
|
|||
|
|
jmx:
|
|||
|
|
exposure:
|
|||
|
|
include: '*'
|
|||
|
|
web:
|
|||
|
|
exposure:
|
|||
|
|
include: '*'
|
|||
|
|
endpoint:
|
|||
|
|
shutdown:
|
|||
|
|
enabled: true #允许admin工程远程停止本应用
|
|||
|
|
health:
|
|||
|
|
show-details: always
|
|||
|
|
# mybatis-plus
|
|||
|
|
spring:
|
|||
|
|
# 环境 dev|test|prod
|
|||
|
|
profiles:
|
|||
|
|
active: dev
|
|||
|
|
# 应用名称
|
|||
|
|
application:
|
|||
|
|
name: chat-master
|
|||
|
|
# bean定义允许覆盖
|
|||
|
|
main:
|
|||
|
|
allow-bean-definition-overriding: true
|
|||
|
|
# jackson时间格式化
|
|||
|
|
jackson:
|
|||
|
|
time-zone: GMT+8
|
|||
|
|
date-format: yyyy-MM-dd HH:mm:ss
|
|||
|
|
# 文件上传限制
|
|||
|
|
servlet:
|
|||
|
|
multipart:
|
|||
|
|
max-file-size: 100MB
|
|||
|
|
max-request-size: 100MB
|
|||
|
|
enabled: true
|
|||
|
|
# 指定静态资源的路径
|
|||
|
|
resources:
|
|||
|
|
static-locations: classpath:/static/,classpath:/templates/
|
|||
|
|
# 缓存
|
|||
|
|
redis:
|
|||
|
|
open: true # 是否开启redis缓存 true开启 false关闭
|
|||
|
|
database: 0
|
|||
|
|
host: chat-master-redis
|
|||
|
|
port: 6379
|
|||
|
|
password: # 密码(默认为空)
|
|||
|
|
timeout: 6000 # 连接超时时长(毫秒
|
|||
|
|
lettuce:
|
|||
|
|
pool:
|
|||
|
|
max-active: 1000 # 连接池最大连接数(使用负值表示没有限制)
|
|||
|
|
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
|||
|
|
max-idle: 10 # 连接池中的最大空闲连接
|
|||
|
|
min-idle: 5 # 连接池中的最小空闲连接
|
|||
|
|
#指定数据源
|
|||
|
|
datasource:
|
|||
|
|
type: com.alibaba.druid.pool.DruidDataSource
|
|||
|
|
#多数据源配置
|
|||
|
|
dynamic:
|
|||
|
|
primary: master
|
|||
|
|
strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
|
|||
|
|
datasource:
|
|||
|
|
# 数据库1
|
|||
|
|
master:
|
|||
|
|
driver-class-name: com.mysql.jdbc.Driver
|
|||
|
|
url: jdbc:mysql://chat-master-mysql:3306/chat_master?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
|
|||
|
|
username: chat_master
|
|||
|
|
password: chat_master
|
|||
|
|
# 数据库2
|
|||
|
|
slave_1:
|
|||
|
|
driver-class-name: com.mysql.jdbc.Driver
|
|||
|
|
url: jdbc:mysql://chat-master-mysql:3306/chat_master?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
|
|||
|
|
username: chat_master
|
|||
|
|
password: chat_master
|
|||
|
|
druid:
|
|||
|
|
# 初始连接数
|
|||
|
|
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
|
|||
|
|
poolPreparedStatements: true
|
|||
|
|
filters: stat,wall,slf4j,config
|
|||
|
|
useGlobalDataSourceStat: true
|
|||
|
|
stat:
|
|||
|
|
log-slow-sql: true
|
|||
|
|
merge-sql: true
|
|||
|
|
slow-sql-millis: 10000
|
|||
|
|
mybatis-plus:
|
|||
|
|
mapper-locations: classpath*:/mapper/**/*Mapper.xml
|
|||
|
|
#实体扫描,多个package用逗号或者分号分隔
|
|||
|
|
typeAliasesPackage: com.master.chat.core.entity;com.master.chat.sys.entity
|
|||
|
|
# 支持统配符 * 或者 ; 分割
|
|||
|
|
typeEnumsPackage: com.master.chat.core.enums;com.master.chat.sys.enums
|
|||
|
|
global-config:
|
|||
|
|
db-config:
|
|||
|
|
#主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
|
|||
|
|
id-type: 0
|
|||
|
|
#字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
|
|||
|
|
field-strategy: 2
|
|||
|
|
#驼峰下划线转换
|
|||
|
|
db-column-underline: true
|
|||
|
|
#刷新mapper 调试神器
|
|||
|
|
refresh-mapper: true
|
|||
|
|
#数据库大写下划线转换
|
|||
|
|
#capital-mode: true
|
|||
|
|
#序列接口实现类配置
|
|||
|
|
#key-generator: cn.jeefast.xxx
|
|||
|
|
#逻辑删除配置
|
|||
|
|
logic-delete-field: flag # 全局逻辑删除的实体字段名(since 3.3.0,配置后可以忽略不配置步骤2)
|
|||
|
|
logic-delete-value: 1
|
|||
|
|
logic-not-delete-value: 0
|
|||
|
|
#自定义填充策略接口实现
|
|||
|
|
#meta-object-handler: cn.jeefast.xxx
|
|||
|
|
#自定义SQL注入器
|
|||
|
|
#sql-injector: cn.jeefast.xxx
|
|||
|
|
configuration:
|
|||
|
|
map-underscore-to-camel-case: true
|
|||
|
|
cache-enabled: false
|
|||
|
|
call-setters-on-nulls: true
|
|||
|
|
# 防止XSS攻击
|
|||
|
|
xss:
|
|||
|
|
# 过滤开关
|
|||
|
|
enabled: true
|
|||
|
|
# 排除链接(多个用逗号分隔)
|
|||
|
|
excludes: /notice
|
|||
|
|
# 匹配链接
|
|||
|
|
urlPatterns: /monitor/*,/tool/*
|
|||
|
|
# 系统配置参数
|
|||
|
|
system:
|
|||
|
|
upload-path: /usr/local/data/upload/
|
|||
|
|
url:
|
|||
|
|
base: http://127.0.0.1:8088/chat-master
|