repository.findOne(id); 出现报错 检查自己使用的SpringBoot 的版本是否是2.0以上,是的话直接改为: repository.findById(id).get(); 问题解决