repository.findOne(id)出错
repository.findOne(id)
你可能使用的SpringBoot 2.0以上的版本,可以直接改为:
repository.findById(id).get(),就可以解决问题
repository.findById(id).get()