# application

#spring.profiles.active=dev
spring.profiles.active=@profiles.active@

spring.application.name=superdesk-uniorder-service

spring.main.web-environment=false

spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
spring.http.encoding.force=true

# embedded server
server.port=8088
server.session.timeout=60

server.tomcat.max-threads=800
server.tomcat.uri-encoding=utf-8

#日期格式化
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
#spring.jackson.time-zone=GMT+8
spring.jackson.time-zone=Asia/Shanghai
spring.jackson.serialization.write-dates-as-timestamps=true

# 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
# 不要设置过大，如果过大，启动项目会报错：打开文件数过多
# CPU有几核，就填写几。
server.undertow.io-threads=32
# 阻塞任务线程池, 当执行类似servlet请求阻塞IO操作, undertow会从这个线程池中取得线程
# 它的值设置取决于系统线程执行任务的阻塞系数，默认值是IO线程数*8
server.undertow.worker-threads=2000
# 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
# 每块buffer的空间大小,越小的空间被利用越充分，不要设置太大，以免影响其他应用，合适即可
server.undertow.buffer-size=1024
# 每个区分配的buffer数量 , 所以pool的大小是buffer-size * buffers-per-region
server.undertow.buffers-per-region=1024
# 是否分配的直接内存(NIO直接分配的堆外内存)
server.undertow.direct-buffers=true


# datasource
spring.datasource.druid.initial-size=5
spring.datasource.druid.min-idle=5
spring.datasource.druid.max-active=20
spring.datasource.druid.max-wait=60000
spring.datasource.druid.validation-query=select 'x'

# redis
spring.redis.pool.maxActive=8
spring.redis.pool.maxWait=-1
spring.redis.pool.maxIdle=8
spring.redis.pool.minIdle=0
spring.redis.timeout=0


# mybatis & pagehelper
mybatis.type-aliases-package=cn.superdesk.uniorder.dao.entity
#mybatis.mapper-locations=classpath*:mappers/*/*.xml,mappers/*/*/*.xml,mappers/*/*/*/*.xml
mybatis.mapper-locations=classpath*:mappers/**/*.xml
#mybatis.configuration.map-underscore-to-camel-case=true
#mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
mybatis.configuration.log-impl=cn.superdesk.uniorder.config.mybatis.SlefLog
#mybatis.configuration.lazy-loading-enabled=true
#mybatis.configuration.use-generated-keys=true
#mybatis.configuration.default-executor-type=reuse
#mybatis.configuration.default-statement-timeout=30
mybatis.configuration.map-underscore-to-camel-case=true
#mybatis.configuration.auto-mapping-behavior=full

# 配置mybaits自定义类型转换类所在的包
#mybatis.type-handlers-package=cn.superdesk.uniorder.common.msyql.JSONFiled
#配置mybaits自定义类型转换类所在的包
mybatis.type-handlers-package=cn.superdesk.uniorder.dao.typehandler

# mybatis plugins
pagehelper.helper-dialect=mysql
pagehelper.reasonable=false
pagehelper.support-methods-arguments=true
pagehelper.params=count=countSql


# dubbo && zookeeper
#spring.dubbo.scan=cn.superdesk.uniorder.dubbo.service
dubbo.scan.base-packages=cn.superdesk.uniorder.dubbo.provider


# logger debug
logging.level.cn.superdesk.uniorder.dao.mapper=info