Files

103 lines
2.6 KiB
YAML
Raw Normal View History

2019-11-06 21:34:55 +08:00
#配置数据源
spring:
application:
name: yshop-system
2019-11-06 21:34:55 +08:00
datasource:
druid:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://localhost:3306/yxshop?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull
2019-11-06 21:34:55 +08:00
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:
properties:
hibernate:
# 生产环境设置成 none避免程序运行时自动更新数据库结构
ddl_auto: none
show_sql: true
format_sql: true
2019-11-06 21:34:55 +08:00
2019-11-09 11:03:01 +08:00
redis:
#数据库索引
database: 0
host: 127.0.0.1
port: 6379
password:
2019-11-09 11:03:01 +08:00
#连接超时时间
timeout: 5000
#jwt
2019-11-06 21:34:55 +08:00
#jwt
jwt:
header: Authorization
# 令牌前缀
token-start-with: Bearer
# 必须使用最少88位的Base64对该令牌进行编码
base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI=
# 令牌过期时间 此处单位/毫秒 默认4小时可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html
token-validity-in-seconds: 14400000
# 在线用户key
online-key: online-token
# 验证码
code-key: code-key
2019-11-06 21:34:55 +08:00
#是否允许生成代码生产环境设置为false
generator:
enabled: true
#是否开启 swagger-ui
swagger:
enabled: true
title: yshop商城管理后台API
serverUrl:
version: 2.1
2019-11-06 21:34:55 +08:00
# 文件存储路径
file:
path: E:\yshop\file\
avatar: E:\yshop\avatar\
2019-11-06 21:34:55 +08:00
# 文件大小 /M
maxSize: 100
avatarMaxSize: 5
localUrl: http://127.0.0.1:8000
mybatis-plus:
check-config-location: true
configuration:
map-underscore-to-camel-case: true
global-config:
db-config:
id-type: auto
logic-delete-value: 1
logic-not-delete-value: 0