847f5126cf
- 添加WebSocketAuthInterceptor处理token认证 - 修改WebSocket连接逻辑,支持token传递 - 统一用户身份识别,确保登录用户使用USER类型 - 修复前端环境变量配置,统一WebSocket URL - 添加Token测试页面用于验证功能 - 更新聊天消息处理逻辑,正确识别用户身份 解决了登录用户发送消息时同时保存GUEST和USER两种类型数据的问题
105 lines
2.5 KiB
YAML
105 lines
2.5 KiB
YAML
server:
|
|
port: 19089
|
|
servlet:
|
|
context-path: /api
|
|
|
|
spring:
|
|
application:
|
|
name: emotion-single
|
|
|
|
profiles:
|
|
active: ${SPRING_PROFILES_ACTIVE:local}
|
|
|
|
# Jackson配置 - 所有环境统一
|
|
jackson:
|
|
date-format: yyyy-MM-dd HH:mm:ss
|
|
time-zone: GMT+8
|
|
serialization:
|
|
write-dates-as-timestamps: false
|
|
default-property-inclusion: non_null
|
|
|
|
# MyBatis Plus配置 - 所有环境统一
|
|
mybatis-plus:
|
|
configuration:
|
|
map-underscore-to-camel-case: true
|
|
cache-enabled: false
|
|
call-setters-on-nulls: true
|
|
jdbc-type-for-null: "null"
|
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
|
global-config:
|
|
db-config:
|
|
id-type: assign_id
|
|
logic-delete-field: isDeleted
|
|
logic-delete-value: 1
|
|
logic-not-delete-value: 0
|
|
banner: false
|
|
mapper-locations: classpath*:mapper/*.xml
|
|
|
|
# 日志配置 - 所有环境统一
|
|
logging:
|
|
level:
|
|
com.emotion: info
|
|
org.springframework.security: warn
|
|
root: info
|
|
pattern:
|
|
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n"
|
|
file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n"
|
|
file:
|
|
name: logs/emotion-single.log
|
|
max-size: 100MB
|
|
max-history: 30
|
|
|
|
# 管理端点配置 - 所有环境统一
|
|
management:
|
|
endpoints:
|
|
web:
|
|
exposure:
|
|
include: health,info,metrics
|
|
endpoint:
|
|
health:
|
|
show-details: always
|
|
|
|
# 应用配置 - 所有环境统一
|
|
emotion:
|
|
# JWT配置
|
|
jwt:
|
|
secret: EmotionMuseumJWTSecretKey2025ForAuthenticationAndAuthorizationSecureEnoughForHS512Algorithm
|
|
expiration: 86400000 # 24小时
|
|
header: Authorization
|
|
prefix: "Bearer "
|
|
|
|
# Coze API配置 - 所有环境统一
|
|
coze:
|
|
api:
|
|
token: pat_GCR4qKzqpf90wMCvKsldMrB18KG3QsLDci65bZthssKsbLxu8X70BKYumleDcabO
|
|
base-url: https://api.coze.cn
|
|
# 对话聊天
|
|
chat:
|
|
talk:
|
|
bot-id: 7523042446285439016
|
|
workflow-id: 7523047462895796287
|
|
# 聊天记录总结
|
|
summary:
|
|
bot-id: 7529062814150295595
|
|
workflow-id: 7523047462895796287
|
|
timeout: 30000
|
|
retry-count: 3
|
|
retry-delay: 1000
|
|
|
|
# 文件上传配置
|
|
upload:
|
|
path: /data/uploads/emotion-museum
|
|
max-file-size: 10MB
|
|
allowed-types: jpg,jpeg,png,gif,pdf,doc,docx
|
|
|
|
# 安全配置
|
|
security:
|
|
ignore-urls:
|
|
- /api/auth/login
|
|
- /api/auth/register
|
|
- /api/health
|
|
- /api/health/info
|
|
- /api/actuator/**
|
|
- /api/websocket/**
|
|
- /api/ai/guest/**
|