ngweijin.quickboot-framework.1.0.25.source-code.application.yml Maven / Gradle / Ivy
# 需要在子工程覆盖info下的参数,否则拿到的信息是这个父工程的,而不是所期待的子工程的。http://localhost:8080/actuator/info
# 配置 SSL 双向认证时 maven 的配置会有冲突,详情参见 sample-quickboot-mybatis-plus 中的 pom.xml 中 build 标签下的 resources 标签
#info:
# app:
# groupId: @project.groupId@
# artifactId: @project.artifactId@
# version: @project.version@
# encoding: @project.build.sourceEncoding@
# java:
# source: @java.version@
# target: @java.version@
# quickboot: @quickboot.version@
# springboot: @springboot.version@
server:
port: 8080
servlet:
context-path: /
tomcat:
uri-encoding: UTF-8
spring:
profiles:
active: dev
mvc:
throw-exception-if-no-handler-found: false
resources:
# 对于Restful风格的应用应该设置为false; 对于传统的应用(如: 使用thymeleaf),应该设置为 true, 否则浏览器访问不到静态资源文件
# 如果启用knife4j-spring-boot-starter,则需要设置为true, 否则无法正常显示接口文档
add-mappings: true
messages:
# 国际化资源文件路径
basename: i18n/messages
jackson:
# 默认就是UTC时区
#time-zone: UTC
# 加上这个配置,从前台接收LocalDateTime类型可直接使用@DateTimeFormat注解
#date-format: yyyy-MM-dd HH:mm:ss
# 序列化所有实体类的字段,包括值为null的
default-property-inclusion: ALWAYS
task:
# @Async Spring异步任务
execution:
pool:
# default 8 TaskExecutionProperties
core-size: 8
# scheduler Spring调度任务
scheduling:
pool:
# default 1 TaskSchedulingProperties
size: 8
# SQL Script DataSource Initialization(Since version 2.5.0): SqlInitializationProperties.java
sql:
init:
enabled: false
schemaLocations:
-
dataLocations:
-
datasource:
driver-class-name: org.h2.Driver
# 以本地文件存储数据的方式使用H2数据库。
# ./h2/test 在项目根路径下保存数据库文件
# AUTO_SERVER=true 启动自动混合模式,允许开启多个连接,该参数不支持在内存中运行模式
# DB_CLOSE_ON_EXIT 当虚拟机退出时并不关闭数据库
url: jdbc:h2:file:./h2/test;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;MODE=MYSQL
# 以内存方式使用数据库(这里会创建一个数据库名为 test 的数据库实例)
# MODE=MYSQL 兼容模式
# url: jdbc:h2:mem:test;MODE=MYSQL
username: sa
password: sa
h2:
console:
# 是否允许网页访问,默认false
enabled: true
# h2数据库的访问路径:http://localhost:8080/h2(默认为/h2-console)
path: /h2
settings:
# 是否允许从其他地方访问,还是只允许从本地访问
web-allow-others: true
# Spring Boot的actuator(健康监控)功能,访问:http://localhost:80/actuator
management:
endpoint:
health:
# always / never / when-authorized
show-details: never
endpoints:
web:
exposure:
# 要暴露出来的接口,可配置:health(默认), info(2.5.0后不再默认暴露出去), * 代表所有
include: [ "*" ]
#exclude: ["trace"]
#server:
#不配置的话默认使用应用程序下的端口
#port: 80
#servlet:
# 默认即为:/actuator
#context-path: /actuator
#日志配置
logging:
file: logs/application.log
level:
root: info
com.github.mengweijin: debug
decorator:
datasource:
enabled: true
p6spy:
# Register P6LogFactory to log JDBC events
enable-logging: true
# Use com.p6spy.engine.spy.appender.MultiLineFormat instead of com.p6spy.engine.spy.appender.SingleLineFormat
multiline: true
# Use logging for default listeners [slf4j, sysout, file]
logging: slf4j
# Log file to use (only with logging=file)
#log-file: spy.log
# Custom log format, if specified com.p6spy.engine.spy.appender.CustomLineFormat will be used with this log format
#log-format:
tracing:
include-parameter-values: true
# http://localhost:8080/doc.html
knife4j:
enable: true
documents:
- group: 1.2.x
name: 测试自定义标题分组
locations: classpath:md/*
setting:
enableSwaggerModels: true
enableDocumentManage: true
enableHost: false
enableHostText: http://localhost:999
enableRequestCache: true
enableFilterMultipartApis: false
enableFilterMultipartApiMethodType: POST
language: zh-CN
cors: false
production: false
basic:
enable: false
username: test
password: 123
quickboot:
# 是否允许跨域
cors: true
xss:
# 是否启用xss过滤
enabled: true
# 不需要xss校验的链接(配置示例:/system/*,/tool/*)
#excludes: /druid/*,/actuator/*