spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8
username: root
password:
# druid连接池
type: com.alibaba.druid.pool.DruidDataSource
#初始连接数
initialSize: 2
#最小空闲数
minIdle: 2
#最大连接数
maxActive: 2
#最大超时数
maxWait: 500
rabbitmq:
host: localhost
port: 5672
stream:
username: guest
password: guest
port: 8080
#生产者两种确认模式
#confrim模式
#也可用spring.rabbitmq.publisher-confirms=true
publisher-/confirm/i-type: correlated
#return模式
publisher-returns: true
#消费者确认
listener:
#用direct会报错
simple:
#开启手动确认模式
acknowledge-mode: manual
#消费消息限流
prefetch: 1
redis:
database: 1
port: 6379
host:
password:
jedis:
pool:
#连接池最大连接数(使用负值表示没有限制)
max-active: 8
#连接池中的最大空闲连接
max-idle: 8
#连接池中的最小空闲连接
min-idle: 0
#连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1
#解决循环依赖
main:
allow-circular-references: true
server:
port: ${port:8080}
#mybatis文件配置
mybatis:
mapper-locations: classpath:mapper/*.xml
type-aliases-package: com.rabbit.dao
#可以将数据库的带下划线_给去掉然后映射到实体类的属性上去。
configuration:
map-underscore-to-camel-case: true