61 lines
2.1 KiB
YAML
61 lines
2.1 KiB
YAML
|
|
|
|||
|
|
spring:
|
|||
|
|
banner:
|
|||
|
|
location: classpath:static/banner.txt
|
|||
|
|
web:
|
|||
|
|
resources:
|
|||
|
|
static-locations: ./public/
|
|||
|
|
cache:
|
|||
|
|
cachecontrol:
|
|||
|
|
no-cache: true
|
|||
|
|
# max-age: 30d
|
|||
|
|
# cache-public: true
|
|||
|
|
profiles:
|
|||
|
|
active: prod
|
|||
|
|
include: magic-api
|
|||
|
|
datasource:
|
|||
|
|
driver-class-name: org.mariadb.jdbc.Driver
|
|||
|
|
url: jdbc:mariadb://${database.host}:${database.port}/${database.name}?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
|
|||
|
|
username: ${database.user}
|
|||
|
|
password: ENC(${database.pin})
|
|||
|
|
flyway:
|
|||
|
|
enabled: true # 是否开启
|
|||
|
|
encoding: UTF-8 # 编码
|
|||
|
|
sql-migration-prefix: V # 脚本文件的前缀,默认为V
|
|||
|
|
sql-migration-separator: __ # 双下划线
|
|||
|
|
baseline-on-migrate: true # 连接数据库中存在表时设置为true
|
|||
|
|
locations: classpath:db/migration # 脚本路径
|
|||
|
|
clean-disabled: false # flyway 的 clean 命令会删除指定 schema 下的所有 table, 生产务必禁掉。这个默认值是 false 理论上作为默认配置是不科学的
|
|||
|
|
validate-on-migrate: true # 执行迁移时是否自动调用验证 当你的 版本不符合逻辑 比如 你先执行了 DML 而没有 对应的DDL 会抛出异常
|
|||
|
|
placeholder-replacement: false # 不做取值替换 默认替换为 ${} ,初始化sql中有sql语句存在freemarker替换,所以禁用此项
|
|||
|
|
servlet:
|
|||
|
|
multipart:
|
|||
|
|
max-file-size: 200MB
|
|||
|
|
max-request-size: 200MB
|
|||
|
|
enabled: true
|
|||
|
|
main:
|
|||
|
|
allow-circular-references: true
|
|||
|
|
|
|||
|
|
server:
|
|||
|
|
# port: 2023
|
|||
|
|
servlet:
|
|||
|
|
context-path: /
|
|||
|
|
tomcat:
|
|||
|
|
uri-encoding: UTF-8
|
|||
|
|
max-threads: 1000
|
|||
|
|
min-spare-threads: 5
|
|||
|
|
connection-timeout: 60000
|
|||
|
|
keep-alive-timeout: 600000
|
|||
|
|
compression:
|
|||
|
|
enabled: true
|
|||
|
|
mime-types: text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml
|
|||
|
|
|
|||
|
|
mybatis-plus:
|
|||
|
|
mapper-locations: classpath:db/mapper/*Mapper.xml
|
|||
|
|
configuration:
|
|||
|
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
|||
|
|
global-config:
|
|||
|
|
banner: false
|
|||
|
|
|
|||
|
|
logging:
|
|||
|
|
config: ./config/logback-spring.xml
|