inblog logo
|
heo-gom
    springboot 무작정 따라하기

    [따라하기] 3-4. 검색하기

    허성재's avatar
    허성재
    Sep 20, 2024
    [따라하기] 3-4. 검색하기
    notion image
    메인페이지에 검색을 할수 있는 input tag를 넣어준다.
    notion image
    notion image
    BoardRepo에서 검색값을 가져오면 like로 포함되어있는 결과값을 출력한다.
    만약 검색값이 없으면 빈칸이 되기에 전체 리스트를 다 가져올 수 있다.
    notion image
    컨트롤러에서도 title이라는 이름으로 value값을 받을수 있게하고, 필수는 아니라고 지정해준다.
    notion image
    title이 들어왔을때와 안들어 왔을 때를 나누어 Repo를 지정하여준다.
    notion image
    컨트롤러에서 title 들어오는걸 알 수있게 인풋에 id를 넣어준다.
    Share article

    heo-gom

    RSS·Powered by Inblog