85 lines
3.6 KiB
YAML
85 lines
3.6 KiB
YAML
server:
|
||
port: 7777
|
||
servlet:
|
||
context-path: /sms
|
||
|
||
spring:
|
||
datasource:
|
||
druid:
|
||
url: jdbc:mysql://121.36.71.250:58082/db_cloud_smessage?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true
|
||
db-type: mysql
|
||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||
username: root
|
||
password: admin
|
||
initial-size: 2
|
||
min-idle: 2
|
||
max-active: 5
|
||
max-wait: 60000
|
||
time-between-eviction-runs-millis: 60000
|
||
min-evictable-idle-time-millis: 300000
|
||
validation-query: SELECT 1 FROM DUAL
|
||
test-while-idle: true
|
||
test-on-borrow: false
|
||
test-on-return: false
|
||
pool-prepared-statements: true
|
||
max-pool-prepared-statement-per-connection-size: 10
|
||
filter:
|
||
commons-log:
|
||
connection-logger-name: stat,wall,log4j
|
||
stat:
|
||
log-slow-sql: true
|
||
slow-sql-millis: 2000
|
||
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||
use-global-data-source-stat: true
|
||
kafka:
|
||
bootstrap-servers: 121.36.71.250:58030
|
||
producer:
|
||
# 发生错误后,消息重发的次数。
|
||
retries: 0
|
||
#当有多个消息需要被发送到同一个分区时,生产者会把它们放在同一个批次里。该参数指定了一个批次可以使用的内存大小,按照字节数计算。
|
||
batch-size: 16384
|
||
# 设置生产者内存缓冲区的大小。
|
||
buffer-memory: 33554432
|
||
# 键的序列化方式
|
||
key-serializer: org.apache.kafka.common.serialization.StringSerializer
|
||
# 值的序列化方式
|
||
value-serializer: org.apache.kafka.common.serialization.StringSerializer
|
||
# acks=0 : 生产者在成功写入消息之前不会等待任何来自服务器的响应。
|
||
# acks=1 : 只要集群的首领节点收到消息,生产者就会收到一个来自服务器成功响应。
|
||
# acks=all :只有当所有参与复制的节点全部收到消息时,生产者才会收到一个来自服务器的成功响应。
|
||
acks: 1
|
||
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
|
||
# 键的反序列化方式
|
||
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
|
||
# 值的反序列化方式
|
||
value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
|
||
listener:
|
||
# 在侦听器容器中运行的线程数。
|
||
concurrency: 5
|
||
#listner负责ack,每调用一次,就立即commit
|
||
ack-mode: manual_immediate
|
||
missing-topics-fatal: false
|
||
|
||
mybatis:
|
||
config-location: classpath:mybatis/mybatis-config.xml
|
||
mapper-locations: classpath*:mybatis/mapper/**/*.xml
|
||
|
||
sms:
|
||
hua-chuang:
|
||
active: true
|
||
url: https://124.239.153.233:8014
|
||
username: 922402
|
||
password: WT@6usGwKiantk
|
||
extno: 10690402
|
||
|
||
logging:
|
||
level:
|
||
ink.wgink: debug |