![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
《Spring WebFlux》
探路人
这个作者很懒,什么都没留下…
展开
-
三、WebFlux 上传、下载、展示
三、WebFlux上传、下载、展示一、文件上传 一个真实案例中,文件传到服务器后,要继续上传到 OSS,经实测 transferTo 的方案更完美。DataBufferUtils 的方案,传到服务器没问题,但继续上传到 OSS 后,图片总是只有上半身。/** * 文件上传 */@ApiOperation("轮播图 - 上传")@PostMapping("/admin/chart/upload", consumes = [MediaType.MULTIPART_FORM_DATA_原创 2020-09-04 16:49:11 · 2142 阅读 · 0 评论 -
二、WebFlux 权限拦截
二、WebFlux 权限拦截 与 SpringMVC 不同,WebFlux 不再使用 Interceptor,取而代之的是 org.springframework.web.server.WebFilter。而同样的,为了排除一些不需要拦截的方法、或类,我们需要定义一个注解。注解@Retention@Target(AnnotationTarget.CLASS, AnnotationTarget.FILE, AnnotationTarget.FUNCTION, AnnotationT原创 2020-09-01 12:40:38 · 5576 阅读 · 3 评论 -
一、WebFlux 统一包装响应
原创文章,转载请注明出处。一、确认手术点 根据官方介绍:https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html,确定 ResponseBodyResultHandler 是处理由 @ResponseBody 注释的方法的,进一步 Debug ...原创 2019-09-02 15:14:46 · 4578 阅读 · 12 评论