diff --git a/src/main/java/com/api/trip/common/init/InitData.java b/src/main/java/com/api/trip/common/init/InitData.java index 9a9cbb0..07c557e 100644 --- a/src/main/java/com/api/trip/common/init/InitData.java +++ b/src/main/java/com/api/trip/common/init/InitData.java @@ -43,7 +43,8 @@ public CommandLineRunner init() { private void createTag() { - String[] tags = {"부산", "제주", "서울", "요트", "경주", "눈꽃여행", "기차"}; + String[] tags = {"부산", "제주", "서울", "강원", "경남", "춘천", "목포", "여수", "안동", "경주", "대구", "대전", "전주" + ,"눈꽃", "스키", "보드", "바다", "요트", "해양스포츠", "단풍", "골프"}; for (String name : tags) { Tag tag = Tag.builder() diff --git a/src/main/java/com/api/trip/common/naverapi/NaverApiService.java b/src/main/java/com/api/trip/common/naverapi/NaverApiService.java index 77d141b..568e5a7 100644 --- a/src/main/java/com/api/trip/common/naverapi/NaverApiService.java +++ b/src/main/java/com/api/trip/common/naverapi/NaverApiService.java @@ -12,7 +12,8 @@ @Service public class NaverApiService { - private final List tagList = Arrays.asList("부산", "제주", "서울", "크루즈", "일출", "해수욕장"); + private final List tagList = Arrays.asList("부산", "제주", "서울", "강원", "경남", "춘천", "목포", "여수", "안동", "경주", "대구", "대전", "전주" + ,"눈꽃", "스키", "보드", "바다", "요트", "해양스포츠", "단풍", "골프"); public List doFilterCategory(List items){ List filteredItems = new ArrayList<>(); @@ -43,6 +44,13 @@ public List toCreateItemRequest(List items){ } public List extractTagNames(String title){ - return tagList.stream().filter(tag -> title.contains(tag)).toList(); + List list = tagList.stream().filter(tag -> title.contains(tag)).toList(); + + if(title.contains("양양") || title.contains("속초") || title.contains("강릉") || title.contains("평창") || title.contains("강원")) + list.add("강원"); + if(title.contains("여수") || title.contains("순천")) + list.add("여수"); + + return list; } }