Files
yshop-drink/ruoyi-api/src/main/resources/application.yml
T
2019-10-09 20:29:21 +08:00

166 lines
5.6 KiB
YAML

server:
port: 8009
light-security:
# 权限规则配置:表示用{http-method}方法请求的{path}路径必须具备什么{expression}
spec-list:
- http-method: ANY
path: /oauth/access_token
expression: "anon()"
- http-method: ANY
path: /shop/notify
expression: "anon()"
- http-method: get
path: /shop/index-list
expression: "anon()"
- http-method: get
path: /shop/mall-lists
expression: "anon()"
- http-method: get
path: /doc.html
expression: "anon()"
- http-method: get
path: /webjars/**
expression: "anon()"
- http-method: get
path: /swagger-resources/**
expression: "anon()"
# - http-method: GET
# path: /user/info
# expression: "hasAnyRoles('user')"
- http-method: ANY
path: /user/super
expression: "hasAllRoles('user','admin')"
- http-method: ANY
path: /**
expression: "hasLogin()"
jwt:
# jwt sign算法
algorithm: hs512
# jwt secret
secret: 86def2a732f5c304999c4cd766380f0a44622214639de1ba4268f5bbedab2ebc029a8064263065510d359adade883aca947029171601399fc3f1c866b0b0bed2
# jwt 有效时间
expiration-in-second: 1209600
mybatis-plus:
mapper-locations: classpath*:com/ruoyi/app/common/persistence/dao/mapping/*.xml,classpath*:mapper/**/*Mapper.xml
typeAliasesPackage: com.ruoyi.app.common.persistence.model
global-config:
banner: false
db-config:
# 主键类型 0:数据库ID自增 1.未定义 2.用户输入 3 id_worker 4.uuid 5.id_worker字符串表示
id-type: AUTO
#字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
field-strategy: NOT_NULL
# 默认数据库表下划线命名
table-underline: true
# configuration:
# map-underscore-to-camel-case: false
# cache-enabled: true #配置的缓存的全局开关
# lazyLoadingEnabled: true #延时加载的开关
# multipleResultSetsEnabled: true #开启的话,延时加载一个属性时会加载该对象全部属性,否则按需加载属性
## log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #打印sql语句,调试用
spring:
#DATABASE CONFIG
datasource:
#driver-class-name: com.mysql.jdbc.Driver
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
#driverClassName: com.mysql.cj.jdbc.Driver
username: root
password: root
url: jdbc:p6spy:mysql://localhost:3306/supply?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=UTC
#url: jdbc:mysql://localhost:3306/ruoyi?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=UTC
type: com.alibaba.druid.pool.DruidDataSource #这里是配置druid连接池,以下都是druid的配置信息
druid:
# 初始连接数
initialSize: 5
# 最小连接池数量
minIdle: 10
# 最大连接池数量
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效
testWhileIdle: true
validationQuery: SELECT 1 FROM DUAL
testOnBorrow: false
testOnReturn: false
webStatFilter:
enabled: true
statViewServlet:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username:
login-password:
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
#redis 配置
redis:
database: 0
host: 127.0.0.1
lettuce:
pool:
max-active: 8 #最大连接数据库连接数,设 0 为没有限制
max-idle: 8 #最大等待连接中的数量,设 0 为没有限制
max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
shutdown-timeout: 100ms
password: ''
port: 6379
swagger:
enabled: true
title: 标题
description: 描述信息
version: 1.0
contact:
name: 维护者信息
#base-package: swagger扫描的基础包,默认:全扫描(分组情况下此处可不配置)
#全局参数,比如Token之类的验证信息可以全局话配置
global-operation-parameters:
- description: 'Token信息,必填项'
modelRef: 'string'
name: 'Authorization'
parameter-type: 'header'
required: true
groups:
basic-group:
base-package: com.battcn.controller.basic
system-group:
base-package: com.battcn.controller.system
logging:
level:
com.ruoyi.app.modular: debug
wx:
pay:
appId: wxa82b5b7fcb0ec161
mchId:
mchKey:
subAppId:
subMchId:
keyPath:
miniapp:
appid: wxa82b5b7fcb0ec161
secret:
token:
aesKey:
msgDataFormat: JSON