拓展Swagger功能,支持JsonView视图,全网首发 对象使用jackson进行json序列化和反序列化时,能通过@JsonView设置要屏蔽的字段,但swagger不能识别@JsonView,在接口文档中,应该被屏蔽的字段仍会展示出来,此代码作用就是让swagger能识别JsonView注解,正确渲染字段。 功能一年前就写
步骤: 1、打开https://github.com ; 2、搜索 jsonView 链接:https://github.com/search?utf8=✓&q=jsonview; 3、选择需要下载的json插件 (我下载的是这个gildas-lormeau/JSONView-for-Chrome); 4、点击【Download Zip】,插件下载完成,解压缩到相应目录 eg:(D:\Downlo
前言:由于谷歌浏览器经常打不开应用商店,我们可以使用第三方插件方式。方法如下 1.下载JSONVIEW JSONVIEW插件下载地址:https://codechina.csdn.net/mirrors/gildas-lormeau/jsonview-for-chrome?utm_source=csdn_github_accelerator 2.解压JSONVIEW到本地 3.选择Chrome右上角
JSONView-for-Chrome 下载地址:https://github.com/gildas-lormeau/JSONView-for-Chrome 解压JSONView-for-Chrome-master.zip打开chrome,右上角-->更多工具-->扩展程序 或 在地址栏直接输入 chrome://extensions/右上角,选中“开发模式”; 点击"加载已解压的扩展程序..." ->
1、User类 package com.imooc.model;import com.fasterxml.jackson.annotation.JsonView;/** * @author oy * @date 2019年6月22日 下午10:42:03 * @version 1.0.0 */public class User { public interface UserSimpleView {}; public interface UserDetailView extends Use
下载jsonview git clone https://github.com/gildas-lormeau/JSONView-for-Chrome 点击扩展程序 加载已解压的扩展程序 安装之后查看json文件就很方便了
1、打开 https://github.com ; 2、搜索 jsonView 链接:https://github.com/search?utf8=%E2%9C%93&q=jsonview; 3、选择需要的插件(我是选这个gildas-lormeau/JSONView-for-Chrome); 4、点击【Download Zip】,插件下载完成,解压缩到相应目录(D:\Download\JSONView-for-Chrome-master); 5、安