feat(oss): 实现文件上传功能并集成Feign调用

- 新增文件上传接口,支持multipart/form-data格式
- 配置Spring Servlet multipart参数,设置文件大小限制
- 添加Feign客户端配置,支持表单提交
- 实现Feign请求拦截器,传递用户上下文信息
- 创建OSS服务API接口,用于文件上传
- 在用户服务中集成OSS RPC调用,实现头像和背景图上传
- 添加上传失败的业务异常处理
- 更新pom.xml依赖,引入OpenFeign、负载均衡及Feign表单相关组件
- 定义API常量和服务名称
- 启用Feign客户端扫描,支持跨服务调用
This commit is contained in:
Hanserwei
2025-10-04 15:53:22 +08:00
parent 91e36d5a84
commit 4b992c35ca
18 changed files with 215 additions and 5 deletions

12
pom.xml
View File

@@ -50,6 +50,7 @@
<activation.version>1.1.1</activation.version>
<jaxb-runtime.version>2.3.3</jaxb-runtime.version>
<cos-api.version>5.6.227</cos-api.version>
<feign-form.version>3.8.0</feign-form.version>
</properties>
<dependencyManagement>
<dependencies>
@@ -203,6 +204,17 @@
<artifactId>cos_api</artifactId>
<version>${cos-api.version}</version>
</dependency>
<dependency>
<groupId>com.hanserwei</groupId>
<artifactId>han-note-oss-api</artifactId>
<version>${revision}</version>
</dependency>
<!-- Feign 表单提交 -->
<dependency>
<groupId>io.github.openfeign.form</groupId>
<artifactId>feign-form</artifactId>
<version>${feign-form.version}</version>
</dependency>
</dependencies>
</dependencyManagement>