findByArticleTitleAndContent

@Query(value = " SELECT a FROM Article a WHERE (:title IS NULL OR a.title LIKE CONCAT('%', :title, '%')) OR (:content IS NULL OR a.content LIKE CONCAT('%', :content, '%')) ")
abstract fun findByArticleTitleAndContent(@Param(value = "title") title: String? = null, @Param(value = "content") content: String? = null, pageable: Pageable): Page<Article>

게시글 제목으로 조회하는 메소드

Parameters

title

검색할 게시글 제목(null일 경우 전체 조회)

content

검색할 게시글 내용(null일 경우 전체 조회)

pageable

페이징 정보 객체