# 配置文件加密key 生产环境中可通过环境变量、命令行等形式进行设置
|
jasypt:
|
encryptor:
|
password: xboot
|
|
server:
|
port: 8888
|
servlet:
|
context-path: /
|
tomcat:
|
uri-encoding: UTF-8
|
threads:
|
max: 1000
|
min-spare: 30
|
# 最大吞吐量不限制
|
max-swallow-size: -1
|
# 优雅停机 关闭容器后默认等待30秒继续执行没处理完的任务 避免数据不一致
|
shutdown: graceful
|
|
spring:
|
lifecycle:
|
# 配置优雅停机后的缓冲器 最大等待时间
|
timeout-per-shutdown-phase: 10S
|
# 数据源
|
datasource:
|
url: jdbc:mysql://127.0.0.1:3306/tobacco?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
|
username: root
|
# Jasypt加密 可到common-utils中找到JasyptUtil加解密工具类生成加密结果 格式为ENC(加密结果) 以下解密结果为123456
|
password: ENC(/1qjpLsQSzc4KM+2VhqLecwQu3npNYZo/zclpH/VR34dMdLeW2IVin6V1vH1Xug4)
|
type: com.alibaba.druid.pool.DruidDataSource
|
driverClassName: com.mysql.jdbc.Driver
|
# Druid StatViewServlet配置
|
druid:
|
stat-view-servlet:
|
# 默认true 内置监控页面首页/druid/index.html
|
enabled: true
|
url-pattern: /druid/*
|
# 允许清空统计数据
|
reset-enable: true
|
login-username: root
|
login-password: ENC(PYVnAYh+j5C3jkMV1d+myj6JzDaUk7pcfTWUaYsvQdEVkuvIVf7Y0mOU9XkffxT8)
|
# IP白名单 多个逗号分隔
|
allow:
|
# IP黑名单
|
deny:
|
filter:
|
stat:
|
# 开启监控sql
|
enabled: true
|
# 显示并标注慢sql 默认当超过3秒显示
|
log-slow-sql: true
|
slow-sql-millis: 3000
|
merge-sql: true
|
# 防SQL注入过滤
|
wall:
|
config:
|
# 允许多条sql同时执行
|
multi-statement-allow: true
|
jpa:
|
# 显示sql
|
show-sql: true
|
# 自动生成表结构
|
hibernate:
|
ddl-auto: update
|
# Redis
|
redis:
|
host: 127.0.0.1
|
# 数据库索引 默认0
|
database: 1
|
port: 6379
|
# 超时时间 Duration类型 3秒
|
timeout: 3S
|
# Elasticsearch
|
data:
|
elasticsearch:
|
# 暂未使用ES 关闭其持久化存储
|
repositories:
|
enabled: false
|
elasticsearch:
|
rest:
|
# 要连接的ES客户端Rest Uri 多个逗号分隔
|
uris: http://localhost:9200
|
# 定时任务
|
quartz:
|
# 任务信息存储至数据库
|
job-store-type: jdbc
|
jdbc:
|
# 自动生成表 若已有表数据请务必关闭 ALWAYS/EMBEDDED/NEVER
|
initialize-schema: NEVER
|
properties:
|
org:
|
quartz:
|
scheduler:
|
# 允许调度程序节点一次获取(触发)的最大触发器数
|
batchTriggerAcquisitionMaxCount: 5
|
jobStore:
|
# 加锁调度
|
acquireTriggersWithinLock: true
|
# “容忍”触发器经过下一次触发时间的毫秒数
|
misfireThreshold: 10000
|
# 工作流
|
activiti:
|
check-process-definitions: false
|
db-identity-used: true
|
# 自动生成Activiti相关表 第一次生成后建议关闭提高运行速度
|
database-schema-update: true
|
history-level: full
|
# 扩展配置
|
xboot:
|
# 流程图字体 默认宋体
|
activityFontName: Microsoft YaHei
|
labelFontName: Microsoft YaHei
|
# 文件大小上传配置
|
servlet:
|
multipart:
|
max-file-size: -1
|
max-request-size: -1
|
jackson:
|
time-zone: GMT+8
|
serialization:
|
fail-on-empty-beans: false
|
boot:
|
admin:
|
# 修改上下文路径
|
context-path: /xboot/admin
|
client:
|
# 服务端url
|
url: http://127.0.0.1:${server.port}/xboot/admin
|
instance:
|
# 实例url
|
service-base-url: http://127.0.0.1:${server.port}/
|
web:
|
resources:
|
cache:
|
cachecontrol:
|
# 静态资源缓存30天
|
max-age: 30D
|
autoconfigure:
|
exclude:
|
# Activiti5.22需要排除
|
- org.activiti.spring.boot.SecurityAutoConfiguration
|
# 暂未使用ES 排除client自动装配类
|
- org.springframework.boot.autoconfigure.data.elasticsearch.ReactiveElasticsearchRestClientAutoConfiguration
|
|
xboot:
|
# 全局限流
|
ratelimit:
|
# 开启
|
enable: true
|
# 每1秒内(单位毫秒)
|
timeout: 1000
|
# 总限制200个请求(单位个)
|
limit: 200
|
# IP限流
|
iplimit:
|
# 开启
|
enable: true
|
# 每1秒内(单位毫秒)
|
timeout: 1000
|
# 每个ip限制20个请求(单位个)
|
limit: 20
|
# 后台token交互方式
|
token:
|
# 默认为true,token将存入redis,并具有单点登录功能 设为false使用JWT交互
|
redis: true
|
# 是否开启单设备登陆 仅当token交互方式为redis时生效
|
sdl: false
|
# token中存储用户权限数据 设为true开启后可避免每次请求再获取用户权限,但有可能导致编辑权限菜单后无法读取到最新权限数据(需用户重新登录)
|
storePerms: true
|
# token过期时间 redis模式有请求自动刷新(分钟)
|
tokenExpireTime: 600
|
# 用户选择 保存登录状态/记住我 对应token过期时间(天)
|
saveLoginTime: 7
|
# 限制用户登陆错误次数(次)
|
loginTimeLimit: 10
|
# 错误超过次数后多少分钟后才能继续登录(分钟)
|
loginAfterTime: 10
|
# app应用 token交互配置
|
appToken:
|
# 是否开启同一平台单设备登陆(如安卓设备只允许登录一个相同账号,同时IOS设备可允许一个设备登陆)
|
spl: true
|
# token过期时间 有请求自动刷新(天)
|
tokenExpireTime: 30
|
# 使用Spring @Cacheable注解失效时间
|
cache:
|
# 缓存过期时间 Duration类型 D–天 H小时 M–分钟 S–秒 永久不过期设为非正值
|
timeToLive: 15D
|
# 日志记录方式 true使用Elasticsearch记录 false记录至数据库中
|
logRecord:
|
es: false
|
# 文件大小上传配置 单位MB
|
maxUploadFile: 5
|
# 腾讯位置服务key配置 腾讯位置服务官网注册添加key
|
qqlbs:
|
key: 你的腾讯位置服务key
|
# 第三方社交登录配置
|
social:
|
# 前端回调登录地址
|
callbackFeUrl: http://127.0.0.1:9999/login
|
# 前端绑定账号回调地址
|
callbackFeRelateUrl: http://127.0.0.1:9999/relate
|
# github
|
github:
|
clientId: 你的clientId
|
clientSecret: 你的clientSecret
|
callbackUrl: http://127.0.0.1:8888/xboot/social/github/callback
|
# qq
|
qq:
|
appId: 你的appId
|
appKey: 你的appKey
|
callbackUrl: http://127.0.0.1:8888/xboot/social/qq/callback
|
# weibo
|
weibo:
|
appKey: 你的appKey
|
appSecret: 你的appSecret
|
callbackUrl: http://127.0.0.1:8888/xboot/social/weibo/callback
|
# wechat
|
wechat:
|
appId: 你的appId
|
appSecret: 你的appSecret
|
callbackUrl: http://127.0.0.1:8888/xboot/social/wechat/callback
|
# 钉钉
|
dingding:
|
# 扫码登录应用
|
appId: 你的appId
|
appSecret: 你的appSecret
|
callbackUrl: http://127.0.0.1:8888/xboot/social/dingding/callback
|
# 企业微信
|
workwechat:
|
appId: 你的appId 企业的CorpID
|
agentId: 你的应用ID
|
appSecret: 你的应用Secret
|
callbackUrl: http://127.0.0.1:8888/xboot/social/workwechat/callback
|
|
# 需要验证码校验的接口路径 支持通配符 自动过滤拦截校验 无需开发人员再次校验
|
captcha:
|
# 图片验证码验证
|
image:
|
- /xboot/login # 登录接口
|
- /xboot/oauth2/authorize # 认证接口
|
# 短信验证码验证
|
sms:
|
- /xboot/user/regist # 注册接口
|
- /xboot/user/smsLogin # 短信登录接口
|
- /xboot/user/resetByMobile # 手机重置密码
|
- /xboot/user/changeMobile # 更换绑定手机
|
- /xboot/app/v1/member/quickLogin # 会员快捷登录注册接口
|
# Vaptcha验证码验证
|
vaptcha:
|
- /xboot/common/captcha/sendRegistSms/** # 发送注册短信
|
- /xboot/common/captcha/sendResetSms/** # 发送重置密码短信
|
- /xboot/email/sendResetCode/** # 发送重置密码邮件
|
- /xboot/social/relate # 绑定第三方账号
|
# Email验证码验证
|
email:
|
- /xboot/email/resetByEmail # 邮件重置密码
|
- /xboot/email/editEmail # 修改绑定邮箱
|
|
# 忽略url
|
ignored:
|
# 无需登录认证的请求
|
urls:
|
- /xboot/app/v1/**
|
- /xboot/oauth2/**
|
- /xboot/actuator/**
|
- /xboot/admin/**
|
- /chat/**
|
- /modeler/**
|
- /editor-app/**
|
- /xboot/act/**
|
- /xboot/dictData/getByType/**
|
- /xboot/email/sendResetCode/**
|
- /xboot/email/resetByEmail
|
- /xboot/file/view/**
|
- /xboot/social/**
|
- /xboot/ws/**
|
- /xboot/setting/notice
|
- /xboot/user/regist
|
- /xboot/user/smsLogin
|
- /xboot/user/resetByMobile
|
- /xboot/common/**
|
- /druid/**
|
- /doc.html
|
- /swagger-resources/**
|
- /v2/api-docs
|
- /**/*.js
|
- /**/*.css
|
- /**/*.png
|
- /**/*.ico
|
- /xboot/test/**
|
- /xboot/fingerprint/getAll
|
# 限流及黑名单不拦截的路径
|
limitUrls:
|
- /**/*.js
|
- /**/*.css
|
- /**/*.png
|
- /**/*.ico
|
|
# Actuator
|
management:
|
health:
|
# 暂未用到ES 关闭其健康检查
|
elasticsearch:
|
enabled: false
|
endpoint:
|
health:
|
show-details: always
|
status:
|
http-mapping:
|
DOWN: 200
|
OUT_OF_SERVICE: 200
|
FATAL: 200
|
UNKNOWN: 200
|
endpoints:
|
web:
|
base-path: /xboot/actuator/
|
exposure:
|
include: '*'
|
|
# 接口文档增强UI Swagger界面内容配置
|
knife4j:
|
enable: true
|
|
swagger:
|
title: XBoot API接口文档
|
description: XBoot Api Documentation
|
version: 1.0.0
|
termsOfServiceUrl: http://xboot.exrick.cn
|
contact:
|
name: Exrick
|
url: http://blog.exrick.cn
|
email: 1012139570@qq.com
|
# 分组名
|
group: 1.XBoot管理接口 v1.0
|
group2: 2.XBoot APP接口 v1.0
|
|
# Mybatis-plus
|
mybatis-plus:
|
mapper-locations: classpath*:mapper/*.xml
|
# configuration:
|
# 日志控制台打印
|
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
|
# 日志
|
logging:
|
# 输出级别
|
level:
|
root: info
|
file:
|
# 指定路径
|
path: xboot-logs
|
logback:
|
rollingpolicy:
|
# 最大保存天数
|
max-history: 7
|
# 每个文件最大大小
|
max-file-size: 5MB
|