snack-mall/server-snack/src/main/resources/application.yml

79 lines
2.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

server:
port: 8080
spring:
application:
name: server-snack
# 数据源配置
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/snack_mall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&useSSL=false
username: root
password: 123456
# Redis 配置
data:
redis:
host: localhost
port: 6379
password:
database: 0
lettuce:
pool:
max-active: 8
max-idle: 8
min-idle: 0
max-wait: -1ms
# 文件上传大小限制
servlet:
multipart:
max-file-size: 10MB
max-request-size: 20MB
# MyBatis-Plus 配置
mybatis-plus:
mapper-locations: classpath*:com/snack/server/mapper/**/*.xml
type-aliases-package: com.snack.server.entity
configuration:
map-underscore-to-camel-case: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
id-type: auto
logic-delete-field: deleted
logic-delete-value: 1
logic-not-delete-value: 0
# Sa-Token 配置
sa-token:
# token 名称(同时也是 cookie 名称)
token-name: Authorization
# token 有效期单位默认30天-1 代表永不过期
timeout: 2592000
# token 最低活跃频率(单位:秒),-1 表示不限制
active-timeout: -1
# 是否允许同一账号多地同时登录(为 true 时允许一起登录,为 false 时新登录挤掉旧登录)
is-concurrent: true
# 在多人登录同一账号时,是否共用一个 token
is-share: false
# token 风格默认可取值uuid、simple-uuid、random-32、random-64、random-128、tik
token-style: uuid
# 是否输出操作日志
is-log: false
# Knife4j 配置
knife4j:
enable: true
setting:
language: zh_cn
# 文件上传本地存储路径(本地存储时使用)
snack:
upload:
# 文件上传根路径
path: ./uploads/
# 访问域名前缀(用于拼接图片 URL
domain: http://localhost:8080/uploads/