当前位置: 代码迷 >> 综合 >> Springboot JpaRepository repository.findOne() 方法报错
  详细解决方案

Springboot JpaRepository repository.findOne() 方法报错

热度:2   发布时间:2024-01-17 11:55:11.0

repository.findOne(id)出错

你可能使用的SpringBoot 2.0以上的版本,可以直接改为:

repository.findById(id).get(),就可以解决问题

  相关解决方案