您的位置:首页 > 产品设计 > UI/UE

The method findOne(Example) in the type QueryByExampleExecutor is not applicable for the

2020-06-02 05:10 1151 查看

问题描述:The method findOne(Example) in the type QueryByExampleExecutor is not applicable for the arguments (int)

问题原因:新版本的springboot没有findOne(int id)这个方法了

解决方案:使用findById(Integer id).orElse(null),这里表示,如果id存在则返回需要查找的信息,如果不存在,这里设置为返回null(推荐)

参考:
https://blog.csdn.net/ken1583096683/article/details/81989580

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐