Files
yshopb2c/yshop-api/src/main/resources/config/application-dev.yml

125 lines
3.2 KiB
YAML
Raw Normal View History

2019-11-06 21:34:55 +08:00
#配置数据源
spring:
datasource:
druid:
type: com.alibaba.druid.pool.DruidDataSource
#driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
url: jdbc:p6spy:mysql://localhost:3306/yxshop?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
2019-11-06 21:34:55 +08:00
#url: jdbc:log4jdbc:mysql://localhost:3306/yxshop?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
username: root
password: root
2019-11-06 21:34:55 +08:00
# 初始化配置
initial-size: 3
# 最小连接数
min-idle: 3
# 最大连接数
max-active: 15
# 获取连接超时时间
max-wait: 5000
# 连接有效性检测时间
time-between-eviction-runs-millis: 90000
# 最大空闲时间
min-evictable-idle-time-millis: 1800000
test-while-idle: true
test-on-borrow: false
test-on-return: false
validation-query: select 1
# 配置监控统计拦截的filters
filters: stat
stat-view-servlet:
url-pattern: /druid/*
reset-enable: false
web-stat-filter:
url-pattern: /*
exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*"
#配置 Jpa
jpa:
hibernate:
# 生产环境设置成 none避免程序运行时自动更新数据库结构
ddl-auto: update
redis:
#数据库索引
database: 0
host: 127.0.0.1
port: 6379
password:
2019-11-06 21:34:55 +08:00
#连接超时时间
timeout: 5000
#jwt
jwt:
header: Authorization
secret: JBqNQX7HD9xhwHP7
# token 过期时间 6个小时
expiration: 210000000
auth:
# 授权路径
path: /login
# 获取用户信息
account: /info
#是否允许生成代码生产环境设置为false
generator:
enabled: true
#是否开启 swagger-ui
swagger:
enabled: true
# 文件存储路径
file:
path: E:\yshop\file\
avatar: E:\yshop\avatar\
# 文件大小 /M
maxSize: 100
avatarMaxSize: 5
localUrl: http://localhost:8000
yshop:
#通知相关配置
notify:
mail:
# 邮件通知配置,邮箱一般用于接收业务通知例如收到新的订单sendto 定义邮件接收者,通常为商城运营人员
enable: false
host: smtp.exmail.qq.com
username: ex@ex.com.cn
password: XXXXXXXXXXXXX
sendfrom: ex@ex.com.cn
sendto: ex@qq.com
# 短消息模版通知配置
# 短信息用于通知客户例如发货短信通知注意配置格式template-nametemplate-templateId 请参考 NotifyType 枚举值
sms:
enable: false
# 如果是腾讯云短信则设置active的值tencent
# 如果是阿里云短信则设置active的值aliyun
active: tencent
sign: litemall
template:
- name: paySucceed
templateId: 156349
- name: captcha
templateId: 156433
- name: ship
templateId: 158002
- name: refund
templateId: 159447
tencent:
appid: 111111111
appkey: xxxxxxxxxxxxxx
aliyun:
regionId: xxx
accessKeyId: xxx
accessKeySecret: xxx
# 快鸟物流查询配置
express:
enable: true
appId:
appKey: