#接口访问
#http://localhost:16200/energy-manage-service/doc.html
######################自定义配置文件######################
# 日志路径(环境)
path.log = @profiles.active@
spring.banner.location=classpath:banner/banner.txt

server.port = 16200
server.servlet.context-path = /energy-manage-service/
server.tomcat.uri-encoding = UTF-8
# 最大连接数
server.tomcat.max-connections=100000
# 最小空闲线程数
server.tomcat.threads.min-spare=100
# 最大线程数
server.tomcat.threads.max=800
# 当tomcat启动线程达到最大时，允许的最大排队请求个数
server.tomcat.accept-count = 1000
# server.tomcat.basedir = /opt/projecttmp
server.maxHttpHeaderSize = 8192
#请求数据量
server.tomcat.max-http-form-post-size = 200MB
#超时时间
server.tomcat.connection-timeout = 180000
# 应用名称
spring.application.name = energy-manage-service
# 自定义配置文件上传
spring.servlet.multipart.max-file-size = 314572800
spring.servlet.multipart.max-request-size= 1048576000
# 全局时间格式转化
#spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
#spring.jackson.time-zone=GMT+8
spring.jackson.serialization.write-dates-as-timestamps=true
# 指定开发环境-由maven控制多环境
spring.profiles.active = @profiles.active@

#数据库设置
spring.datasource.type = com.alibaba.druid.pool.DruidDataSource
#spring.datasource.druid.driver-class-name = com.mysql.jdbc.Driver
spring.datasource.druid.driver-class-name = com.mysql.cj.jdbc.Driver
spring.datasource.druid.url = jdbc:mysql://127.0.0.1:3306/energy?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
spring.datasource.druid.username = root
spring.datasource.druid.password = shiyue
#初始化大小
spring.datasource.druid.initial-size = 30
#最小
spring.datasource.druid.min-idle = 20
#最大
spring.datasource.druid.max-active = 300
#获取连接等待的超时时间
spring.datasource.druid.max-wait = 600000
#间隔多久进行一次检测,检测需要关闭的链接
spring.datasource.druid.time-between-eviction-runs-millis = 60000
#一个链接在池中最小生存时间
spring.datasource.druid.min-evictable-idle-time-millis = 3000000
##配置连接在池中的最大生存时间
#spring.datasource.druid.max-evictable-idle-time-millis = 400000
spring.datasource.druid.validation-query = SELECT 'x'
spring.datasource.druid.test-on-borrow = false
spring.datasource.druid.test-on-return = false
## 启用空闲连接检测，以便回收
spring.datasource.druid.test-while-idle = true
## 打开PSCache，并且指定每个连接上PSCache的大小
spring.datasource.druid.pool-prepared-statements = false
spring.datasource.druid.max-pool-prepared-statement-per-connection-size = 20
spring.datasource.druid.remove-abandoned = true
spring.datasource.druid.remove-abandoned-timeout = 7200
spring.datasource.druid.log-abandoned = false

#Mybatis
mybatis.mapper-locations = classpath*:mybatis/**/*.xml
mybatis.type-aliases-package = com.energy.manage.common.po
mybatis.configuration.mapUnderscoreToCamelCase = true

#mappers 多个接口时逗号隔开
mapper.mappers = com.energy.manage.common.mapper.MyMapper
mapper.not-empty =false
mapper.identity = MYSQL

#pagehelper
pagehelper.helperDialect = mysql
pagehelper.reasonable = true
pagehelper.supportMethodsArguments = true

#redis-config
spring.redis.jedis.pool.max-idle = 100
spring.redis.jedis.pool.min-idle = 10
spring.redis.jedis.pool.max-active = 1000
spring.redis.jedis.pool.max-wait = 100000
spring.redis.database = 1
spring.redis.host = 127.0.0.1
spring.redis.port = 6379
spring.redis.password = 123456

# debug - sql显示
logging.level.com.energy.manage.service.mappers= debug

# 接口文档
knife4j.enable=true

#xxl-job
#xxl.job.admin.addresses = http://192.168.50.241:16800/xxl-job-admin
#xxl.job.accessToken =
#xxl.job.executor.appname = xxl-job-executor-sample
#xxl.job.executor.address =
#xxl.job.executor.ip =
#xxl.job.executor.port = 9999
#xxl.job.executor.logpath = /Users/shiyue/Downloads/logs/xxl
#xxl.job.executor.logretentiondays = 30


#kafka
spring.kafka.bootstrap-servers=127.0.0.1:9092
spring.kafka.producer.batch-size=16384
spring.kafka.producer.acks=all
spring.kafka.producer.retries=3

#消费者
spring.kafka.consumer.bootstrapServers=127.0.0.1:9092
#spring.kafka.consumer.topics=xxxx
spring.kafka.consumer.groupId=energy-manage
spring.kafka.consumer.sessionTimeOut=30000
spring.kafka.consumer.enableAutoCommit=false
spring.kafka.consumer.autoCommitInterval=1000
spring.kafka.consumer.maxPollRecords=50
spring.kafka.consumer.maxPollInterval=300000
spring.kafka.consumer.keyDeserializer=org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.consumer.valueDeserializer=org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.consumer.autoOffsetReset=latest
spring.kafka.consumer.heartbeatInterval=10000

#监听
spring.kafka.listener.type=batch
spring.kafka.listener.ack-mode=batch