增加 transient 修饰进行解决,例如: private transient final DecimalFormat df = new DecimalFormat("#0.00"); 转载于:https://www.cnblogs.com/yshyee/p/7691951.html