|
|
server:
|
|
|
port: 9003
|
|
|
servlet:
|
|
|
context-path: /api
|
|
|
#替换Tomcat容器,性能更优
|
|
|
undertow:
|
|
|
io-threads: 16
|
|
|
worker-threads: 256
|
|
|
buffer-size: 1024
|
|
|
buffers-per-region: 1024
|
|
|
direct-buffers: true
|
|
|
spring:
|
|
|
servlet:
|
|
|
multipart:
|
|
|
max-file-size: 5MB # 限制文件上传的大小
|
|
|
jackson:
|
|
|
#指定日期格式,比如yyyy-MM-dd HH:mm:ss
|
|
|
date-format: yyyy-MM-dd HH:mm:ss
|
|
|
#指定日期格式化时区
|
|
|
time-zone: GMT+8
|
|
|
datasource:
|
|
|
dynamic:
|
|
|
druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
|
|
|
# 连接池的配置信息
|
|
|
# 初始化大小,最小,最大
|
|
|
initial-size: 5
|
|
|
min-idle: 5
|
|
|
maxActive: 20
|
|
|
# 配置获取连接等待超时的时间
|
|
|
maxWait: 60000
|
|
|
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
|
|
timeBetweenEvictionRunsMillis: 60000
|
|
|
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
|
|
minEvictableIdleTimeMillis: 300000
|
|
|
validationQuery: SELECT 1 FROM DUAL
|
|
|
testWhileIdle: true
|
|
|
testOnBorrow: true
|
|
|
testOnReturn: true
|
|
|
# 打开PSCache,并且指定每个连接上PSCache的大小
|
|
|
poolPreparedStatements: true
|
|
|
maxPoolPreparedStatementPerConnectionSize: 20
|
|
|
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
|
|
|
filters: stat,wall,slf4j
|
|
|
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
|
|
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
|
|
datasource:
|
|
|
master:
|
|
|
driver-class-name: com.mysql.jdbc.Driver
|
|
|
url: jdbc:mysql://localhost:3306/synthesize_energy?useUnicode=true&&characterEncoding=utf8&useSSL=false&serverTimezone=UTC
|
|
|
username: root
|
|
|
password: root
|
|
|
redis:
|
|
|
host: 182.92.205.118
|
|
|
port: 6379
|
|
|
banner:
|
|
|
charset: utf-8
|
|
|
image:
|
|
|
location: banner.gif
|
|
|
# mybatis-plus相关配置
|
|
|
mybatis-plus:
|
|
|
# xml扫描,多个目录用逗号或者分号分隔(告诉 Mapper 所对应的 XML 文件位置)
|
|
|
mapper-locations: classpath:mapper/*.xml
|
|
|
# 以下配置均有默认值,可以不设置
|
|
|
global-config:
|
|
|
db-config:
|
|
|
#主键类型 AUTO:"数据库ID自增" INPUT:"用户输入ID",ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
|
|
|
id-type: id_worker_str
|
|
|
#字段策略 IGNORED:"忽略判断" NOT_NULL:"非 NULL 判断") NOT_EMPTY:"非空判断"
|
|
|
field-strategy: NOT_EMPTY
|
|
|
#数据库类型
|
|
|
db-type: MYSQL
|
|
|
configuration:
|
|
|
# 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射
|
|
|
map-underscore-to-camel-case: true
|
|
|
# 如果查询结果中包含空值的列,则 MyBatis 在映射的时候,不会映射这个字段
|
|
|
call-setters-on-nulls: true
|
|
|
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
|
|
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
|
|
logging:
|
|
|
config: classpath:log4j2-dev.xml
|
|
|
swagger:
|
|
|
enable: true
|
|
|
naturalResources:
|
|
|
num1: 6300
|
|
|
num2: 5040
|
|
|
num3: 3780
|
|
|
num4: 0.13 #增值税率
|
|
|
|
|
|
web:
|
|
|
#upload-path: /root/photo
|
|
|
upload-path: E:/image
|
|
|
task:
|
|
|
pool:
|
|
|
# 核心线程池大小
|
|
|
core-pool-size: 10
|
|
|
# 最大线程数
|
|
|
max-pool-size: 30
|
|
|
# 活跃时间
|
|
|
keep-alive-seconds: 60
|
|
|
# 队列容量
|
|
|
queue-capacity: 50
|
|
|
|
|
|
|
...
|
...
|
|