feat(learning-auth): add optional JWT learning flow with secure demo endpoint

This commit is contained in:
likingcode
2026-03-09 02:11:49 +08:00
parent 8f93488989
commit efcfe7e012
11 changed files with 322 additions and 1 deletions

View File

@@ -1,2 +1,10 @@
server.port=8082
spring.application.name=springboot-demo
# 学习友好:默认只保护 /api/secure/**
learning.auth.enabled=true
learning.auth.jwt.secret=demo-learning-secret-key-demo-learning-secret-key
learning.auth.jwt.expiration=86400000
# 避免默认生成密码干扰学习输出
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration