Post

[졸작] AWS 캠핑장 데이터 처리(2) - RDS 성능 향상

💡 AWS RDS로 MySQL 구축하기

👉 RDS에서 데이터베이스 인스턴스 생성

1
2
3
4
5
6
7
8
9
10
11
12
13
@GetMapping("/basedList")
    public ResponseEntity<List<GoCampingItemDto>> baseSearch() throws IOException {
        JSONArray jsonArray = goCampingService.baseSearch();
        List<GoCampingItemDto> dtos = new ArrayList<>();
        for (int i = 0; i < jsonArray.length(); i++) {
            JSONObject jsonObject = jsonArray.getJSONObject(i);
            GoCampingItemDto dto = new GoCampingItemDto();
            goCampingService.setDtoFields(dto, jsonObject);
            dtos.add(dto);
            campsiteService.saveCampsite(dto);
        }
        return ResponseEntity.ok(dtos);
    }
This post is licensed under CC BY 4.0 by the author.