- Self-Descriptive Message와 HATEOAS를 만족하는 REST API를 구현
- REST Docs를 통하여 REST API 문서화
- 스프링 부트
- 스프링 데이터 JPA
- 스프링 HATEOAS
- 스프링 REST Docs
- 스프링 시큐리티 OAuth2
Body 에 grant_type에 refresh_token, refresh_token에 엑세스 토큰발급받을 때 같이 발급받았던 refresh_token에 정보를 입력하여 요청하면 access_type이 bearer 인 access_token 정보를 받을 수있다.
{
"_embedded": {
"eventList": [
{
"id": 3,
"name": "event 0",
"description": "test index 0",
"beginEnrollmentDateTime": "2024-03-23T14:21:00",
"closeEnrollmentDateTime": "2024-03-24T14:21:00",
"beginEventDateTime": "2024-03-25T14:21:00",
"endEventDateTime": "2024-03-26T14:21:00",
"location": "강남역 D2 스타텁 팩토리",
"basePrice": 100,
"maxPrice": 200,
"limitOfEnrollment": 100,
"offline": true,
"free": false,
"eventStatus": "DRAFT",
"manger": {
"id": 1
},
"_links": {
"self": {
"href": "http://localhost:8080/api/events/3"
}
}
},
...
{
"id": 22,
"name": "event 19",
"description": "test index 19",
"beginEnrollmentDateTime": "2024-03-23T14:21:00",
"closeEnrollmentDateTime": "2024-03-24T14:21:00",
"beginEventDateTime": "2024-03-25T14:21:00",
"endEventDateTime": "2024-03-26T14:21:00",
"location": "강남역 D2 스타텁 팩토리",
"basePrice": 100,
"maxPrice": 200,
"limitOfEnrollment": 100,
"offline": true,
"free": false,
"eventStatus": "DRAFT",
"manger": {
"id": 1
},
"_links": {
"self": {
"href": "http://localhost:8080/api/events/22"
}
}
}
]
},
"_links": {
"first": {
"href": "http://localhost:8080/api/events?page=0&size=20"
},
"self": {
"href": "http://localhost:8080/api/events?page=0&size=20"
},
"next": {
"href": "http://localhost:8080/api/events?page=1&size=20"
},
"last": {
"href": "http://localhost:8080/api/events?page=1&size=20"
},
"profile": {
"href": "/docs/index.html#resources-events-list"
}
},
"page": {
"size": 20,
"totalElements": 30,
"totalPages": 2,
"number": 0
}
}{
"_embedded": {
"eventList": [
{
"id": 3,
"name": "event 0",
"description": "test index 0",
"beginEnrollmentDateTime": "2024-03-23T14:21:00",
"closeEnrollmentDateTime": "2024-03-24T14:21:00",
"beginEventDateTime": "2024-03-25T14:21:00",
"endEventDateTime": "2024-03-26T14:21:00",
"location": "강남역 D2 스타텁 팩토리",
"basePrice": 100,
"maxPrice": 200,
"limitOfEnrollment": 100,
"offline": true,
"free": false,
"eventStatus": "DRAFT",
"manger": {
"id": 1
},
"_links": {
"self": {
"href": "http://localhost:8080/api/events/3"
}
}
},
...
{
"id": 10,
"name": "event 7",
"description": "test index 7",
"beginEnrollmentDateTime": "2024-03-23T14:21:00",
"closeEnrollmentDateTime": "2024-03-24T14:21:00",
"beginEventDateTime": "2024-03-25T14:21:00",
"endEventDateTime": "2024-03-26T14:21:00",
"location": "강남역 D2 스타텁 팩토리",
"basePrice": 100,
"maxPrice": 200,
"limitOfEnrollment": 100,
"offline": true,
"free": false,
"eventStatus": "DRAFT",
"manger": {
"id": 1
},
"_links": {
"self": {
"href": "http://localhost:8080/api/events/10"
}
}
}
]
},
"_links": {
"first": {
"href": "http://localhost:8080/api/events?page=0&size=20"
},
"self": {
"href": "http://localhost:8080/api/events?page=0&size=20"
},
"next": {
"href": "http://localhost:8080/api/events?page=1&size=20"
},
"last": {
"href": "http://localhost:8080/api/events?page=1&size=20"
},
"profile": {
"href": "/docs/index.html#resources-events-list"
},
"create-event": {
"href": "http://localhost:8080/api/events"
}
},
"page": {
"size": 20,
"totalElements": 30,
"totalPages": 2,
"number": 0
}
}{
"id": 33,
"name": "Spring",
"description": "REST API Development with Spring",
"beginEnrollmentDateTime": "2024-03-23T14:21:00",
"closeEnrollmentDateTime": "2024-03-24T14:21:00",
"beginEventDateTime": "2024-03-25T14:21:00",
"endEventDateTime": "2024-03-26T14:21:00",
"location": "강남역 D2 스타텁 팩토리",
"basePrice": 100,
"maxPrice": 200,
"limitOfEnrollment": 100,
"offline": true,
"free": false,
"eventStatus": "DRAFT",
"manger": null,
"_links": {
"self": {
"href": "http://localhost:8080/api/events/33"
},
"query-events": {
"href": "http://localhost:8080/api/events"
},
"update-event": {
"href": "http://localhost:8080/api/events/33"
},
"profile": {
"href": "/docs/index.html#resources-events-create"
}
}
}









