spring: #静态资源处理 resources: #启动默认静态资源处理,默认是启用 add-mappings: true cache: #h缓存相应时间 单位秒 cachecontrol: max-age: 3600 chain: #资源链自动缓存,默认启动 cache: true #启动资源 默认禁用 enabled: true #启用压缩资源(gizp,brotil)解析,默认禁用 compressed: true #开启h5应用缓存,默认禁用 html-application-cache: true #静态资源目录 static-locations: classpath:/static/ redis: #超时时间 timeout: 10000ms #服务地址 host: 192.168.174.128 #服务端口 port: 6379 #数据库 database: 0 #密码 password: root #连接池 lettuce: pool: #最大连接数 ,默认是8 max-active: 8 #最大连接数阻塞等待时间,默认是-1 max-wait: 10000ms #最大空闲 数 max-idle: 8 #最小空闲数 min-idle: 5 #RabbiMQ rabbitmq: #服务器 host: 192.168.174.182 #用户名 username: guest #密码 password: guest #虚拟机 virtual-host: / #端口 port: 5672 #监听 listener: simle: #消费者最下数量 concurrency: 10 #消费者最大数量 max-concurrency: 10 #限制消费者每次只处理一条信息,处理完在继续下一条 prefetch: 1 #启动时是否默认启动容器 auto-startup: ture #被拒绝时重新进入队列 default-requeue-rejected: ture #模板 template: retry: #发布重试,默认false enabled: true #重试时间 默认1000ms initial-interval: 1000ms #重试最大次数 最大3 max-attempts: 3 #重试最大间隔时间 max-interval: 10000ms #重试的时间隔乘数,比如配2,0 第一次等于10s,第二次等于20s,第三次等于40s multiplier: 1 thymeleaf: cache: false datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql:///seckill?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai username: root password: root hikari: pool-name: DateHikari minimum-idle: 5 idle-timeout: 180000 maximum-pool-size: 10 max-lifetime: 180000 auto-commit: true connection-timeout: 30000 connection-init-sql: SELECT 1 mybatis-plus: mapper-locations: classpath*:/mapper/*Mapper.xml type-aliases-package: com.jt.pojo logging: level: com.jt: debug
秒杀的yml配置 (包含了RabbitMQ的配置)
最新推荐文章于 2024-05-13 16:15:23 发布