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
相关文章推荐
- The method setValue(String) in the type ParamTag is not applicable for the arguments (long)
- The method add(Fragment) in the type ArrayList<Fragment> is not applicable for the arguments (ImageF
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argum
- [真理永垂不朽]The method XXX in the type FragmentTransaction is not applicable for the arguments XXX
- The method addActionListener(ActionListener) in the type AbstractButton is not applicable for the ar
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argum
- The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the argument
- The method setOnKeyListener(View.OnKeyListener) in the type View is not applicable for the argum
- The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the argument
- 错误:The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, MyFragment)
- c:forTokens 报错 The method setItems(String) in the type ForTokensTag is not applicable for the argume
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argum
- The method setClass(Context, Class<?>) in the type Intent is not applicable for the问题
- The method add(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (i
- The method makeText(Context, int, int) in the type Toast is not applicable for the arguments (new Vi
- 报错 The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the ar
- The method load(Class, Serializable) in the type Session is not applicable for the arguments (Class<
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argu
- 错误:The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the argum
- he method get(Class, Serializable) in the type HibernateTemplate is not applicable for the arguments