对于1M以内的文件上传,无需任何处理,大文件10M以上需要为上传路径添加/zuul前缀,也可使用zuul.servlet-path自定义前缀
如果Zuul使用了Ribbon做负载均衡,那么对于超大的文件,需要提升超时设置:hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds:60000
ribbon:
将服务注册到Eureka Server上,并配置文件上传大小的限制,配置文件添加以下内容:
@ReponseBody
@Controller
public class FileUploadController{
}