本地java类 import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; / 问题处理记录 / public class UserIssueProcessDto { / 处 ...
分类:
编程语言 时间:
2020-01-06 14:56:42
阅读次数:
81
需要引包: import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; pom.xml需要引入: <dependency> <groupId>com.alibaba</groupId> <artifac ...
分类:
Web程序 时间:
2020-01-04 10:34:20
阅读次数:
133
上代码干货 import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import org.apache.http.HttpEntity; import org.apache.http.client.metho ...
分类:
其他好文 时间:
2020-01-01 23:29:08
阅读次数:
62
使用场景 在项目中,后端查询数据库返回的字段需要过滤传给前端,或者只需要一部分字段 方法一 new newVO,DTO类,实体类来解决 (太老土的做法) 方法二 使用transient关键字 (密码,和身份证号字段多使用) 把需要过滤掉字段使用transient关键字修饰,这样在调用JSON的toS ...
分类:
Web程序 时间:
2019-12-31 18:33:07
阅读次数:
181
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.mongodb.client.ListIndexesIterable; import com.mongodb.client.mod... ...
分类:
数据库 时间:
2019-12-30 14:11:39
阅读次数:
783
Mybatis和logback的应用配置 1、在module的pom.xml文件中,加载springboot和swagger、lombok、fastjson、mysql、mybatis包 2、在resources中添加配置: 配置文件有两种,一种是properties,另一种是yaml,这里使用ya ...
分类:
编程语言 时间:
2019-12-27 16:41:19
阅读次数:
270
贴上aop配置 import com.alibaba.fastjson.JSONObject; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.aspect ...
分类:
编程语言 时间:
2019-12-27 11:20:53
阅读次数:
286
//String to Json String str = "{\"语文\":\"88\",\"数学\":\"78\",\"计算机\":\"99\"}"; JSONObject jsonObject; jsonObject = JSONObject.parseObject(str); System. ...
分类:
Web程序 时间:
2019-12-24 20:19:45
阅读次数:
93
查看JSONObject源码: @Override public String toString() { return toJSONString(); } public String toJSONString() { SerializeWriter out = new SerializeWriter ...
分类:
Web程序 时间:
2019-12-24 15:44:37
阅读次数:
308
最近一直有用到解析各种数据,主要是用FastJson进行数据解析,其中一个重要的类为JSONObject,今天有时间,所以进行总结一下: JSONobject是FastJson提供的对象,在api中是用一个私有的常量map进行封装的,实际就是一个map,只不过FastJson对其进行了封装, 添加了 ...
分类:
Web程序 时间:
2019-12-24 13:37:03
阅读次数:
98