配置 Booking 服务

Booking 是 的组件,基于 Spring Boot 构建。

在 application.yaml 文件中配置以下参数。

服务器设置

应用监听的端口。

参数 说明 默认值
server.port 服务器端口 9090

Java Spring 框架属性

参数 说明 默认值
spring.datasource.url 数据库地址 jdbc:postgresql://localhost:15432/seatmap
spring.datasource.username 数据库连接用户名 seatmap
spring.datasource.password 数据库连接密码 postgres
spring.datasource.hikari.connection-timeout 连接超时 60000 (六十秒)
spring.datasource.hikari.maximum-pool-size 最大连接池大小 20
spring.datasource.driver-class-name 数据库通信使用的 JDBC 驱动 org.postgresql.Driver
spring.data.redis.host Redis 服务器主机 localhost
spring.data.redis.port Redis 服务器端口 16379

分隔符设置

组合键分隔符(sector;;row;;seat)。

参数 说明 默认值
export.delimiter 分隔符 ;;

服务

参数 说明 默认值
seatmap.path.metrics 指标发送地址 https://stat.seatmap.pro/booking-metrics
seatmap.path.editor Editor 服务地址 http://localhost:8080

预订会话

参数 说明 默认值
seatmap.session.enabled 是否提供预订会话端点;false 时不注册 true
seatmap.session.ttl-seconds 活动会话的保留时长,每次 lock 和 unlock 重置 900
seatmap.session.pending-grace-seconds checkout 后的支付宽限期 600
seatmap.session.max-seats 每会话上限,按座位数加通用入场容量计算 10
seatmap.session.reaper-batch-size 每批清理释放的过期会话数量 100
seatmap.session.reaper-max-batches 每次清理的批次数 10
seatmap.session.reaper-interval-ms 到期清理间隔 15000

Springdoc 设置

自动文档生成配置。

参数 说明 默认值
springdoc.pathsToMatch 匹配路径列表 /api/private/**
springdoc.writer-with-order-by-keys 是否启用确定性的字母顺序排序 true

输入功能、设置、端点或 SDK 方法。