feat: 实现邮箱验证码和邮箱绑定功能

- 添加邮件发送服务实现(EmailService/EmailServiceImpl)
- 新增发送验证码、绑定邮箱、解绑邮箱接口
- 用户实体新增邮箱相关字段(userEmail/userEmailVerified)
- 添加邮件配置和JavaMailSender Bean
- 放行邮箱验证码接口(/v1/user/email/send-code)
- 新增ContextHolderUtils工具类用于获取当前用户上下文
- 完善Swagger文档注解

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-01-09 23:53:19 +08:00
parent fc72acf490
commit 47a468096d
15 changed files with 485 additions and 71 deletions

View File

@@ -18,6 +18,11 @@
</properties>
<dependencies>
<!--引入spring boot email-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<!-- SpringDoc OpenAPI - 显式指定版本以兼容 Spring Boot 3.5.x -->
<dependency>
<groupId>org.springdoc</groupId>