diff --git a/src/main/java/com/dodal/meet/configuration/SwaggerConfig.java b/src/main/java/com/dodal/meet/configuration/SwaggerConfig.java index 82562e4..19e1c8e 100644 --- a/src/main/java/com/dodal/meet/configuration/SwaggerConfig.java +++ b/src/main/java/com/dodal/meet/configuration/SwaggerConfig.java @@ -9,8 +9,10 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; @Configuration +@Profile({"local", "dev"}) public class SwaggerConfig { @Bean public OpenAPI openAPI(@Value("${project.version}") String version, diff --git a/src/main/java/com/dodal/meet/repository/CategoryEntityRepository.java b/src/main/java/com/dodal/meet/repository/CategoryEntityRepository.java index fed7d00..5097237 100644 --- a/src/main/java/com/dodal/meet/repository/CategoryEntityRepository.java +++ b/src/main/java/com/dodal/meet/repository/CategoryEntityRepository.java @@ -17,8 +17,8 @@ public interface CategoryEntityRepository extends JpaRepository findByCategoryValue(String categoryValue); @Query( - "SELECT c FROM CategoryEntity c JOIN FETCH c.hashTagEntities WHERE c IN " + - "(SELECT t.categoryEntity FROM TagEntity t WHERE t IN :tagEntityList)" + "SELECT distinct c FROM CategoryEntity c JOIN FETCH c.hashTagEntities WHERE c.categoryValue IN " + + "(SELECT distinct substring(t.tagValue, 1, 3) FROM TagEntity t WHERE t IN :tagEntityList)" ) List findAllByTagEntity(@Param("tagEntityList") List tagEntityList); }