상세 컨텐츠

본문 제목

ch3.1~ todo_ap server

패캠스프링/part2.5_ spring가이드

by hippo0207 2022. 7. 13. 16:50

본문

todo list 필요기능
1. 목록에 아이템 추가
2. 목록 중 특정 아이템 조회
3. 전체 목록 조회
4. 목록 중 특정 아이템 수정
5. 목록 중 특정 아이템 삭제
6. 전체 목록 삭제

https://docs.google.com/spreadsheets/d/1c9QSRGHTvMZ5fuuAmxQhyQo0Y8giXFq7mpgaaIB4e0A/edit#gid=1501651067

 

개인 맛집 검색 애플리케이션

API 스펙 method,endpoint,기능,request,response,김영희 POST,todo 아이템 추가,{ "title": "자료구조 공부하기" },{ "id": 17, "title": "자료구조 공부하기", "order": 0, "completed": false, "url": "<a href="http://localhost:8080/17">ht

docs.google.com

intellij-todo-애플리케이션-서버-코드-샘플.zip
0.07MB

method endpoint 기능 request response
POST   todo 아이템 추가 {
"title": "자료구조 공부하기"
}
{
"id": 17,
"title": "자료구조 공부하기",
"order": 0,
"completed": false,
"url": "
http://localhost:8080/17"
}
GET / 전체 todo 리스트 조회 - [
{
"id": 1,
"title": "자바 기초 공부하기",
"order": 0,
"completed": false,
"url": "http://localhost:8080/1"
},
{
"id": 2,
"title": "알고리즘 공부하기",
"order": 0,
"completed": false,
"url": "http://localhost:8080/2"
}, ...
]
GET /{:id} todo 아이템 조회 - {
"id": 17,
"title": "자료구조 공부하기",
"order": 0,
"completed": false,
"url": "
http://localhost:8080/17"
}
PATCH /{:id} todo 아이템 수정 {
"title": "반복문 공부하기"
}
{
"id": 1,
"title": "반복문 공부하기",
"order": 0,
"completed": false,
"url": "http://localhost:8080/1"
}
DELETE / 전체 todo 리스트 삭제   200
DELETE /{:id} todo 아이템 삭제   200
         

 

> implement > series of ..
plugins {
    id 'org.springframework.boot' version '2.4.2'
    id 'io.spring.dependency-management' version '1.0.11 RELEASE'
    id 'java'
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-data-rest'
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'

    runtimeOnly 'com.h2database:h2'
    
    annotationProcessor("org.projectlombok:lombok")
    compileOnly("org.projectlombok:lombok")
    
    testImplementation('org.springframework.boot:spring-boot-starter-test')
}
  • >> 롬복 추가후 추가설정 필요함
    • settings > plugins > lombok 설치 > 인텔리 재실행
    • settings > build,execution, deployment > compiler > annotation Processors > enable annotation processing 체크 

 

 

 

GitHub - saylerb/spring-todo: A Todo-Backend implementation with Spring Boot

A Todo-Backend implementation with Spring Boot . Contribute to saylerb/spring-todo development by creating an account on GitHub.

github.com

 

 

관련글 더보기

댓글 영역