mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-18 02:56:30 +08:00
93 lines
3.5 KiB
YAML
93 lines
3.5 KiB
YAML
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
|