关于java.lang.IllegalArgumentException: class java.text.DecimalFormat declares multiple JSON fields named maximumIntegerDigits异常原因:
以前没问题的业务突然报了这个异常,经排查是因为同事在实体bean中加入了private SimpleDateFormat sdf = new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”);并添加了get/set方法,导致Gson解析时抛出异常。
去掉sdf的get/set方法即可正常解析。