You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/11/26 07:15:58 UTC

[GitHub] [servicecomb-java-chassis] VTracyHuang opened a new issue #2083: 文件上传传其他参数

VTracyHuang opened a new issue #2083:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2083


     @PostMapping(path = "/documentation/upload", produces = MediaType.TEXT_PLAIN_VALUE, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
       public Boolean uploadFile(@RequestBody UploadFileRequest request, @RequestPart("file") MultipartFile multipartFile){
           logger.info("请求参数"+request.toString());
           return false;
       }
   
   请问上传文件的时候,除了文件参数 我可能还需要传递五六个参数 ,我就把他写成了个对象,这样需要怎么传呢?
   文档里 @RequestAttribute可用,只能传一个简单类型。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] VTracyHuang closed issue #2083: 文件上传传其他参数

Posted by GitBox <gi...@apache.org>.
VTracyHuang closed issue #2083:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2083


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] VTracyHuang closed issue #2083: 文件上传传其他参数

Posted by GitBox <gi...@apache.org>.
VTracyHuang closed issue #2083:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2083


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] wujimin commented on issue #2083: 文件上传传其他参数

Posted by GitBox <gi...@apache.org>.
wujimin commented on issue #2083:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2083#issuecomment-734132572


   可以使用JAX-RS里的`@BeanParam`,springmvc模式下也可以用这个标注


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org