Files
orange-admin/orange-demo-multi-uaa/orange-demo-multi-service-uaa/zz-resource/config-data/operation-log-consumer-dev.yaml
2021-12-21 03:03:53 +00:00

93 lines
3.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

logging:
level:
# 这里设置的日志级别优先于log4j2.xml文件Loggers中的日志级别。
com.orangeforms: info
server:
port: 8705
common-log:
# 操作日志配置对应配置文件common-log/OperationLogProperties.java
operation-log:
enabled: true
# OperationLogConsumer对象会直接读取该配置项。
kafkaTopic: SysOperationLog
mybatis-plus:
mapper-locations: classpath:com/orangeforms/*/dao/mapper/*Mapper.xml,com/orangeforms/common/log/dao/mapper/*Mapper.xml
type-aliases-package: com.orangeforms.*.model,com.orangeforms.common.log.model
global-config:
db-config:
logic-delete-value: -1
logic-not-delete-value: 1
pagehelper:
helperDialect: mysql
reasonable: true
supportMethodsArguments: false
params: count=countSql
# 开发数据库相关配置
spring:
kafka:
bootstrap-servers: localhost:9092
consumer:
# 自动提交的时间间隔 在spring boot 2.X 版本中这里采用的是值的类型为Duration 需要符合特定的格式如1S,1M,2H,5D
auto-commit-interval: 1S
# 该属性指定了消费者在读取一个没有偏移量的分区或者偏移量无效的情况下该作何处理:
# latest默认值在偏移量无效的情况下消费者将从最新的记录开始读取数据在消费者启动之后生成的记录
# earliest :在偏移量无效的情况下,消费者将从起始位置读取分区的记录
auto-offset-reset: earliest
# 是否自动提交偏移量默认值是true,为了避免出现重复数据和数据丢失可以把它设置为false,然后手动提交偏移量
enable-auto-commit: false
# 下面的三个配置项fetch-min-size、fetch-max-wait、max-poll-records
# 主要是为了保持批量消费,从而提升效率。
# 最少接收的字节数。
fetch-min-size: 2MB
# 最大等待的时间。
fetch-max-wait: 2S
# 最大获取记录数量。
max-poll-records: 100
# 键的反序列化方式
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
# 值的反序列化方式
value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
listener:
# 在侦听器容器中运行的线程数。
concurrency: 5
# listener负责ack每调用一次就立即commit
ack-mode: manual_immediate
missing-topics-fatal: false
datasource:
type: com.alibaba.druid.pool.DruidDataSource
druid:
url: jdbc:mysql://localhost:3306/zzdemo-multi?characterEncoding=utf8&useSSL=true&serverTimezone=Asia/Shanghai
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
name: operation-log-consumer
initialSize: 10
minIdle: 10
maxActive: 50
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
maxOpenPreparedStatements: 20
validationQuery: SELECT 'x'
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
filters: stat,wall
useGlobalDataSourceStat: true
web-stat-filter:
enabled: true
url-pattern: "/*"
exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*,/actuator/*"
stat-view-servlet:
enabled: true
urlPattern: /druid/*
resetEnable: true