问题描述
要求是用户将使用angular将文件上传到spring boot(ReST请求)。 ReST界面将文件存储到gitlab中以进行进一步处理。使用@RequestPart批注,将从请求中检索具有不同名称的内容并将其放入Gitlab。实现将如下所示:
@ApiOperation(value = "Upload java files into Gitlab")
@RequestMapping(method = RequestMethod.POST,consumes = MediaType.MULTIPART_FORM_DATA_VALUE,produces = "application/json")
@ApiResponses(value = { @ApiResponse(code = 200,response = Customresponse.class,message = "Success"),@ApiResponse(code = 400,response = ErrorResponse.class,message = "Bad Request"),@ApiResponse(code = 500,message = "Internal Server Error") })
public Customresponse uploadJava(
@ApiParam(value = "Interface",required = true)
@RequestPart(name = "interface",required = true) final multipartfile interfaceClass,@ApiParam(value = "Java Class",required = false)
@RequestPart(name = "javaClass",required = false) final multipartfile javaClass) {
return null;
}
我的问题是
注意:
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
致谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)