spring boot @ResponseBody 注解情况下返回自定义类报错406 原因:Result类未提供公共的get,set方法。且非公共类 原类图省事直接写在Controller中 改成这样就不报错了