Skip to content

Commit

Permalink
升级依赖,统一使用fastjson进行Json操作
Browse files Browse the repository at this point in the history
  • Loading branch information
elunez committed Jul 6, 2023
1 parent 8cb9650 commit 0f3578c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion eladmin-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<properties>
<hutool.version>5.8.19</hutool.version>
<hutool.version>5.8.20</hutool.version>
</properties>

<artifactId>eladmin-common</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.lang.reflect.Method;
Expand Down Expand Up @@ -112,6 +113,10 @@ private String getParameter(Method method, Object[] args) {
List<Object> argList = new ArrayList<>();
Parameter[] parameters = method.getParameters();
for (int i = 0; i < parameters.length; i++) {
// 过滤掉不能序列化的类型: MultiPartFile
if (args[i] instanceof MultipartFile) {
continue;
}
//将RequestBody注解修饰的参数作为请求参数
RequestBody requestBody = parameters[i].getAnnotation(RequestBody.class);
if (requestBody != null) {
Expand Down
2 changes: 1 addition & 1 deletion eladmin-system/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<name>核心模块</name>

<properties>
<jjwt.version>0.11.2</jjwt.version>
<jjwt.version>0.11.5</jjwt.version>
<!-- oshi监控需要指定jna版本, 问题详见 https://github.com/oshi/oshi/issues/1040 -->
<jna.version>5.8.0</jna.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public ResponseEntity<PageResult<QiniuContent>> queryQiNiu(QiniuQueryCriteria cr
return new ResponseEntity<>(qiNiuService.queryAll(criteria,pageable),HttpStatus.OK);
}

@Log("上传文件")
@ApiOperation("上传文件")
@PostMapping
public ResponseEntity<Object> uploadQiNiu(@RequestParam MultipartFile file){
Expand Down

0 comments on commit 0f3578c

Please sign in to comment.