错误提示:
Caused by: org.springframework.data.mapping.PropertyReferenceException: No property findall found for type User!
我的代码:
public interface UserRepository extends JpaRepository<User,Long> {
public List findall();
}
错误原因:
没有根据规范写代码,方法名称首字母小写,第二个单词开始首字母大写
修改后代码:
public interface UserRepository extends JpaRepository<User,Long> {
public List findAll();
}
结果:
执行成功。。。。。