요청: application/json
{
"title":"upload test"
}
결과
요청:
{
"course":"1",
"title":"upload test",
"filename":"upload test",
"distance":"1.1",
"moving_time_str":"24:59:59",
"total_time_str":"23:59:59",
"moving_time_sec":"10",
"total_time_sec":"10",
"avg_speed":"1.0",
"avg_pace":"1.0",
"location":"인하대학교",
"latitude":"37.44659903926295",
"longitude":"126.65384268084867",
"max_height":"1000",
"min_height":"10",
"ele_dif":"990",
"total_uphill":"10",
"total_downhill":"10",
"difficulty":"중",
"calorie":"0",
"date":"2021-06-11T02:24:47.921514",
"gpx_url":"...",
"thumbnai":"..."
}
결과
@RequestBody String str
: str에 json이 그대로 저장됨
@RequestBody를 객체로 바로 전달받을 수 있음
이때, TestDto 클래스에 @AAC가 붙으면 에러발생, @Getter와 @Setter만 있어야 함
'개발' 카테고리의 다른 글
jwt 공부 참고 (0) | 2021.09.28 |
---|---|
특정 GPX 파일 실행 시 앱 종료되는 현상 (jenetics/jpx) (0) | 2021.06.14 |
gpx 를 이미지로 변환 (0) | 2021.05.05 |
UserProfileDto NPE (0) | 2021.05.04 |
[연습] querydsl 정렬 포함한 쿼리 실행 시 NPE 발생 (0) | 2021.04.29 |