)rest란?
UI와 서버가 값을 주고 받을 때 rest api를 활용한다. (서버단과 프로트단을 분리하기 위함)
)CRUD
1. 전체조회
method: GET
URI: /rest/visits
2. 1건조회
method: GET
URI: /rest/visit/{idx} -> /rest/visit/1
3. 추가(idx받아오지 않음)
method: POST
URI: /rest/visit
-> POST 방식일 때, 데이터 넘기기
4. 수정(idx받아와야함)
method: PUT(대부분 사용)/PATCH
URI: /rest/visit
-> 추가와 매우 유사(PUT대신 PATCH를 사용해도 되나, PUT을 일반적으로 사용한다)
5. 삭제
method: DELETE
URI: /rest/visit/{idx} -> /rest/visit/1
)비밀번호 체크
'Spring' 카테고리의 다른 글
AOP - 환경설정 (0) | 2024.08.06 |
---|---|
Spring - Ajax로 클라이언트에서 데이터 처리(SPA) (0) | 2024.08.06 |
Spring - JSON converter - JSON형태로 전환/환경 설정 (0) | 2024.08.05 |
Spring - 최종 파일(MVC-Mybatis 설정) (0) | 2024.07.25 |
Spring - 댓글 삭제 (0) | 2024.07.25 |