1616import lombok .RequiredArgsConstructor ;
1717import org .springframework .data .domain .Page ;
1818import org .springframework .data .domain .Pageable ;
19+ import org .springframework .data .web .PageableDefault ;
1920import org .springframework .web .bind .annotation .*;
2021
2122import java .util .List ;
@@ -55,7 +56,7 @@ public ResponseCustom<DetailArticleRes> detailArticle(
5556 public ResponseCustom <Page <SearchArticleRes >> searchArticle (
5657 @ Parameter (description = "검색어" ) @ RequestParam String cond ,
5758 @ Parameter (description = "ASC(오름차순), DESC(내림차순), LIKE(인기순)" )@ RequestParam String sortType ,
58- Pageable pageable
59+ @ PageableDefault ( size = 10 ) Pageable pageable
5960 )
6061 {
6162 return ResponseCustom .OK (articleService .searchArticle (cond , sortType , pageable ));
@@ -73,7 +74,7 @@ public ResponseCustom<Page<SearchArticleRes>> searchArticleByKeyword(
7374 @ Parameter (description = "멤버 id" ) @ IsLogin LoginStatus loginStatus ,
7475 @ Parameter (description = "ASC(오름차순), DESC(내림차순), LIKE(인기순)" ) @ RequestParam String sortType ,
7576 @ Parameter (description = "멤버가 등록한 키워드" ) @ RequestParam String keyword ,
76- Pageable pageable
77+ @ PageableDefault ( size = 10 ) Pageable pageable
7778 )
7879 {
7980 return ResponseCustom .OK (articleService .searchArticleByKeyword (loginStatus .getMemberId (), keyword , sortType , pageable ));
@@ -91,7 +92,7 @@ public ResponseCustom<Page<SearchArticleRes>> searchArticleByIndustry(
9192 @ Parameter (description = "멤버 id" ) @ IsLogin LoginStatus loginStatus ,
9293 @ Parameter (description = "ASC(오름차순), DESC(내림차순), LIKE(인기순)" ) @ RequestParam String sortType ,
9394 @ Parameter (description = "멤버가 등록한 직군" ) @ RequestParam String industry ,
94- Pageable pageable
95+ @ PageableDefault ( size = 10 ) Pageable pageable
9596 )
9697 {
9798 return ResponseCustom .OK (articleService .searchArticleByIndustry (loginStatus .getMemberId (), industry , sortType , pageable ));
0 commit comments