SpringBoot 使用fastjson初识
来源:互联网 发布:淘宝买游戏账号被骗 编辑:程序博客网 时间:2024/05/22 06:21
1. pom文件里引入fastjson的jar
<dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.35</version></dependency>
2. 在主函数中注入Bean
@Beanpublic HttpMessageConverters fastJsonHttpMessageConverters(){ FastJsonHttpMessageConverter fastConverter = new FastJsonHttpMessageConverter(); HttpMessageConverter<?> converter = fastConverter; return new HttpMessageConverters(converter);}
3. 测试结果
jackson: {"id":1,"nickname":"laoli","mobile":"111","headimg":null,"verifyflag":null,"enableflag":null}
fastjson: {"mobile":"111","nickname":"laoli","id":1}
区别:jackson不会转化为null的字段,效率低于fastjson
阅读全文
0 0
- SpringBoot 使用fastjson初识
- springboot使用fastjson
- SpringBoot中使用fastjson
- springboot使用fastjson
- fastjson在springboot中的使用
- springboot系列文章(四)-springboot使用fastjson
- springboot 使用RestTemplate 使用FastJson处理结果
- springboot 使用自己的fastJson框架
- SpringBoot使用FastJson解析Json数据
- Springboot使用FastJson中文乱码解决方法。
- Fastjson 初识
- SpringBoot-01SpringBoot配置FastJson
- SpringBoot 之 第三方Json解析框架FastJson的使用
- Springboot使用FastJson后,接口返回中文乱码的问题解决。
- springboot使用第三方的json解析框架fastjson
- 解决Springboot使用FastJson 返回中文乱码的问题
- 初识Springboot
- 初识 SpringBoot
- 微信小程序8 界面api
- Project facet Java version 1.8 is not supported.
- 无穷小放飞互联网,赶超美日不是梦
- 最新pycharm破解(亲试有效)
- 多线程
- SpringBoot 使用fastjson初识
- PyQt5介绍
- 如何在其他项目调用webservice 发布的soap风格的接口
- webService的soap风格的接口的安全问题
- 前言
- android面试题
- 如何在webservice中配置多数据源
- Say less, plan less,Do more!
- 20170912