【发布时间】:2018-02-02 15:44:11
【问题描述】:
这是我的仓库
public interface NoteRepository extends JpaRepository<Note,Long> {
List<Note> findByContentContains(String content);
以及我在 NoteController 类中的方法,它在 Content 列中返回带有“e”的单词
@GetMapping("/notesletter")
public List<String> getLetters(){
return noteRepository.findByContentContains("e")
.stream()
.map(note -> note.getContent())
.collect(Collectors.toList());
}
请帮助我找到一种方法,该方法将返回每个带有字母“e”的单词,例如,从所有列中返回。 我正在与邮递员合作
【问题讨论】:
标签: java spring repository spring-data-jpa