Files
biji/biji-houdaun/src/main/resources/application.yml
黄孟 ab4891d8db feat(security): 添加 JWT 认证功能
- 在后端添加 JWT 认证过滤器 JwtAuthenticationTokenFilter
- 创建 JwtTokenUtil 工具类用于生成和验证 JWT token
- 在 application.yml 中配置 JWT 相关参数
- 更新前端 HomePage 组件,增加用户认证相关逻辑
2025-07-31 09:27:13 +08:00

39 lines
748 B
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: biji-houdaun
profiles:
active: dev
servlet:
multipart:
max-file-size: 10MB # ???????5MB
max-request-size: 10MB # ???????5MB
file:
upload-dir: uploads
#??
server:
port: 8084
## Snowflake ID?????
# ????ID (0~31)
worker:
id: 1
# ????ID (0~31)
datacenter:
id: 1
# MyBatis-Plus??
mybatis-plus:
mapper-locations: classpath:mapper/*.xml
configuration:
map-underscore-to-camel-case: true
# JWT 配置
jwt:
secret: mysecretkeymysecretkeymysecretkeymysecretkeymysecretkey # 至少256位的密钥
expiration: 86400 # token有效期单位秒这里是24小时
header: Authorization # JWT存储的请求头
tokenHead: "Bearer " # JWT负载中拿到开头