Files
lpt-be/src/main/resources/application.yml
T

88 lines
3.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
spring:
application:
name: LearningProgressTracker
flyway:
# 是否启动 flyway
enabled: true
# 文件编码
encoding: UTF-8
# SQL 脚本位置,默认位于 classpath 下的 db/migration 目录
locations: classpath:db/migration
# SQL 迁移文件的前缀,默认为 V
sql-migration-prefix: V
# SQL 迁移文件中版本与描述间的分隔符,默认为两个下划线 __
sql-migration-separator: __
# SQL 迁移文件的后缀,默认为 .sql
sql-migration-suffixes: .sql
# 是否在迁移时进行验证,默认为 true
validate-on-migrate: true
# 如果 true,首次迁移时基于现有 schema 创建 baseline,这通常用于将 Flyway 集成到已存在的数据库项目中
baseline-on-migrate: true
jackson:
time-zone: UTC
date-format: yyyy-MM-dd'T'HH:mm:ss'Z'
mybatis-plus:
configuration:
# 使用 Slf4j 输出 SQL:由各环境的 logging.level 决定是否打印,生产默认不打印
log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
# 显式声明下划线转驼峰:实体与聚合结果都依赖它,不要依赖框架默认值
map-underscore-to-camel-case: true
############## Sa-Token 配置 (文档: https://sa-token.cc) ##############
sa-token:
# token 名称(同时也是 cookie 名称)
token-name: satoken
cookie:
same-site: None
# token 有效期(单位:秒) 默认30天,-1 代表永久有效
timeout: 2592000
# token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
active-timeout: -1
# 是否允许同一账号多地同时登录 (为 true 时允许一起登录, 为 false 时新登录挤掉旧登录)
is-concurrent: true
# 在多人登录同一账号时,是否共用一个 token (为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token)
is-share: true
# token 风格(默认可取值:uuid、simple-uuid、random-32、random-64、random-128、tik)
token-style: uuid
# 是否输出操作日志
is-log: true
# 健康检查配置
management:
endpoints:
web:
exposure:
include: health,info # 或 "*"
# lpt-ai 独立 AI 服务(可选,未配置时降级为内置规则引擎)
lpt:
ai-service:
url: http://localhost:5199
timeout-seconds: 600
# 学习会话的时间口径(会话-04):三类阈值集中在这里,改口径不需要改代码
study-time:
# 番茄钟长度(分钟)
work-duration-minutes: 25
# 遗忘判定阈值(分钟):超过该时长无操作按「忘了点暂停/结束」只结算一个番茄钟
forget-threshold-minutes: 50
# 硬兜底阈值(分钟):进行中的会话超过该时长仍未结算,由服务端强制收敛
force-pause-minutes: 120
# 有效学习时间下限(秒)
min-effective-time-seconds: 600
# 低频定时收敛扫描间隔(毫秒)
scan-interval-ms: 600000
# 是否开启低频定时收敛
scan-enabled: true
# AI 异步任务(AI-02):提交秒回任务标识,执行器在请求线程之外调用 AI
ai-task:
# 单个任务允许的最长执行时间(秒),超过视为进程中断并可回收重试
stuck-timeout-seconds: 900
# 兜底扫描间隔与首次延迟(毫秒)
scan-interval-ms: 3000
scan-initial-delay-ms: 3000
# 单次扫描处理的任务数上限
scan-batch-size: 10
# 立即投递线程池
executor-core-size: 2
executor-max-size: 4
executor-queue-capacity: 50