76 lines
2.6 KiB
YAML
76 lines
2.6 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
|
||
jackson:
|
||
default-property-inclusion: non_empty
|
||
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: 500MB
|
||
max-request-size: 500MB
|
||
enabled: true
|
||
main:
|
||
allow-circular-references: true
|
||
|
||
feign:
|
||
client:
|
||
config:
|
||
default: # 这里用default就是全局配置,如果是写服务名称,则是针对某个微服务的配置
|
||
connectTimeout: 5000
|
||
readTimeout: 5000
|
||
loggerLevel: BASIC # 日志级别 NONE|BASIC|HEADERS|FULL
|
||
httpclient:
|
||
enabled: true
|
||
max-connections: 200 # httpclient处理的最大连接数量
|
||
max-connections-per-route: 50 # 单个路径连接的最大数量
|
||
connection-timeout: 2000 # 超时等待
|
||
|
||
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 |