63 lines
2.4 KiB
YAML
63 lines
2.4 KiB
YAML
server:
|
||
port: 8030
|
||
|
||
spring:
|
||
application:
|
||
name: basic
|
||
main:
|
||
allow-bean-definition-overriding: true
|
||
mvc:
|
||
# 启用hiddenMethod过滤器(头像上传)
|
||
hiddenmethod:
|
||
filter:
|
||
enabled: true
|
||
datasource: # 数据源的相关配置
|
||
type: com.zaxxer.hikari.HikariDataSource # 数据源类型:HikariCP
|
||
driver-class-name: com.mysql.cj.jdbc.Driver # mysql驱动
|
||
url: jdbc:mysql://8.134.112.96:3306/liuying_mgmt_re?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
||
username: root
|
||
password: yckj2017
|
||
hikari:
|
||
connection-timeout: 30000 # 等待连接池分配连接的最大时长(毫秒),超过这个时长还没可用的连接则发生SQLException, 默认:30秒
|
||
minimum-idle: 5 # 最小连接数
|
||
maximum-pool-size: 20 # 最大连接数
|
||
auto-commit: true # 事务自动提交
|
||
idle-timeout: 60000 # 连接超时的最大时长(毫秒)
|
||
pool-name: DateSourceHikariCP # 连接池名字
|
||
max-lifetime: 180000 # 连接的生命时长(毫秒)
|
||
connection-test-query: SELECT 1 # 连接测试语句
|
||
jackson:
|
||
date-format: "yyyy-MM-dd HH:mm:ss"
|
||
time-zone: GMT+8
|
||
redis:
|
||
host: 10.59.3.242
|
||
port: 6379
|
||
# 密码过于复杂需要使用''引起来,要不可能导致项目无法启动,因为无法识别特殊字符
|
||
password: yckj2018
|
||
jedis:
|
||
pool:
|
||
max-active: -1 # 连接池最大连接数(使用负值表示没有限制)
|
||
min-idle: 1 # 连接池中的最小空闲连接
|
||
time-between-eviction-runs: 3000
|
||
timeout: 40000
|
||
# 配置用户头像存放静态资源文件夹
|
||
resources:
|
||
static-locations: classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/
|
||
# 配置请求文件大小
|
||
servlet:
|
||
multipart:
|
||
max-file-size: 10MB
|
||
max-request-size: 10MB
|
||
|
||
# MyBatis
|
||
mybatis-plus:
|
||
configuration:
|
||
# 开启驼峰命名法
|
||
map-underscore-to-camel-case: true
|
||
use-generated-keys: true
|
||
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
|
||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||
# 指定使用的日志配置文件
|
||
logging:
|
||
config: classpath:logback-spring.xml
|