我使用的是spring数据,我的DAO看起来像这样 public findAllOrderByIdAsc(); // I want to use some thing like this在上面的代码中,注释行显示了我的意图。spring Data可以提供内置的功能来使用这种方法来查找所有按ASC/DESC列排序的记录吗?
但是,当我尝试这样做时,我会收到以下错误:
java.lang.IllegalStateException:检测到不明确的搜索映射。courses.CourseRepository.findAll(org.springframework.data.domain.Pageable)和公共抽象java.lang.Iterable courses.CourseRepository.findAll(org.springframework.data.domain.Sort"SELECT c FROM Course c WHERE c.visible = &