springboot(或springmvc)中后端返回json用法
springboot(或springmvc)中后端返回json用法
使用步骤:
* 1、导入Jackson依赖
* 2、配置Jason乱码问题
* 3、创建ObjectMappper 对象
* 4、将对象转成Json是字符串
* 1、导入Jackson依赖
<!--json依赖-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
原创
2020-12-18 19:56:09 ·
324 阅读 ·
2 评论