diff --git a/src/main/java/store/itpick/backend/config/WebConfig.java b/src/main/java/store/itpick/backend/config/WebConfig.java index 7e639e1..4301a68 100644 --- a/src/main/java/store/itpick/backend/config/WebConfig.java +++ b/src/main/java/store/itpick/backend/config/WebConfig.java @@ -47,7 +47,7 @@ public void addArgumentResolvers(List resolvers) public void addCorsMappings(CorsRegistry registry) { log.info("CorsMapping이 호출 되었습니다."); registry.addMapping("/**") - .allowedOrigins("http://localhost:3000", "http://localhost:5173", "https://localhost:5173", "https://itpick.netlify.app","https://itpick.vercel.app") + .allowedOrigins("http://localhost:3000", "http://localhost:5173", "https://localhost:5173", "https://itpick.netlify.app","https://itpick.vercel.app","https://deploy-preview-85--itpick.netlify.app") .allowedMethods("GET", "POST", "PUT", "DELETE", "PATCH","OPTIONS") .exposedHeaders("location", "Authorization") .allowedHeaders("Content-Type", "Authorization", "X-Requested-With", "Accept") diff --git a/src/main/java/store/itpick/backend/repository/KeywordRepository.java b/src/main/java/store/itpick/backend/repository/KeywordRepository.java index 55d8293..5c41b64 100644 --- a/src/main/java/store/itpick/backend/repository/KeywordRepository.java +++ b/src/main/java/store/itpick/backend/repository/KeywordRepository.java @@ -44,5 +44,7 @@ Optional findTop1ByKeywordAndCommunityOrderByUpdatedAtDesc(@Param("keyw /** 검색할때 사용하는 JPA **/ List findByKeywordStartingWithIgnoreCase(String substring); + List findByKeywordContainingIgnoreCase(String substring); + } \ No newline at end of file diff --git a/src/main/java/store/itpick/backend/service/KeywordService.java b/src/main/java/store/itpick/backend/service/KeywordService.java index e7046e7..f062a13 100644 --- a/src/main/java/store/itpick/backend/service/KeywordService.java +++ b/src/main/java/store/itpick/backend/service/KeywordService.java @@ -280,7 +280,7 @@ public List searchKeywords(String keyword) { } public List searchKeywordsWithBadge(String keyword) { - List keywordList= keywordRepository.findByKeywordStartingWithIgnoreCase(keyword); + List keywordList= keywordRepository.findByKeywordContainingIgnoreCase(keyword); List keywords= new ArrayList<>(); for (Keyword keyword1 : keywordList) { keywords.add(keyword1.getKeyword());