1.异常信息 Fields in a "Serializable" class should either be transient or serializable 2.解决方案 3.加了序列化 还是没用 那就在类中重写 toString()方法 4.附带 一位大佬解决sonar问题的题集 点击跳转