演示实体类 import java.util.List; public class Student { public String name; public int age; public List<String> score; } JSON.toJSONString方法的使用 JSON.toJSONString(Object object)方法 : 方法定义 : public static final String toJSONString(Object object) ; 方法作用 : 将
D package myProject; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.serializer.SerializerFeature; public class Fast
最近在使用JSON.toJSONString过程中出现实体类的属性与转换之前的顺序不一致 public static void main(String[] args) { Person person = new Person(); person.setName("Tom"); person.setAge(20); person.setGender("Male"); person.setHeight(180.5); person.setWeight(80.5); Sy
nested exception is java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyncStarted() returns false)] with root cause private void addOperationLog(JoinPoint joinPoint, Object