From fe0a30b1ce437fac2b66481ae1aeead91a46b9f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=8A=B9=EC=A7=84?= Date: Wed, 29 Nov 2023 00:47:18 +0900 Subject: [PATCH] =?UTF-8?q?[HOTFIX]=20=EB=8F=84=EC=BB=A4=20=EB=B3=BC?= =?UTF-8?q?=EB=A5=A8=20=EC=84=A4=EC=A0=95=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../twtw/backend/config/security/SecurityConfig.java | 3 +-- .../backend/global/advice/GlobalErrorAdvice.java | 12 ++++++------ .../domain/place/controller/PlaceControllerTest.java | 4 ++-- .../domain/plan/controller/PlanControllerTest.java | 4 ++-- docker-compose.yml | 6 +++--- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/backend/src/main/java/com/twtw/backend/config/security/SecurityConfig.java b/backend/src/main/java/com/twtw/backend/config/security/SecurityConfig.java index 5938b096..9e65f171 100644 --- a/backend/src/main/java/com/twtw/backend/config/security/SecurityConfig.java +++ b/backend/src/main/java/com/twtw/backend/config/security/SecurityConfig.java @@ -35,8 +35,7 @@ public SecurityFilterChain configure(HttpSecurity http) throws Exception { "auth/save", "auth/login", "member/duplicate/**", - "plan/**", - "/actuator/**") + "actuator/**") .permitAll()) .authorizeHttpRequests( x -> x.requestMatchers("/test/**").permitAll().anyRequest().authenticated()) diff --git a/backend/src/main/java/com/twtw/backend/global/advice/GlobalErrorAdvice.java b/backend/src/main/java/com/twtw/backend/global/advice/GlobalErrorAdvice.java index 16b55cf7..64c15428 100644 --- a/backend/src/main/java/com/twtw/backend/global/advice/GlobalErrorAdvice.java +++ b/backend/src/main/java/com/twtw/backend/global/advice/GlobalErrorAdvice.java @@ -1,8 +1,8 @@ package com.twtw.backend.global.advice; import com.twtw.backend.global.exception.AuthorityException; +import com.twtw.backend.global.exception.EntityNotFoundException; import com.twtw.backend.global.exception.WebClientResponseException; - import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ExceptionHandler; @@ -17,11 +17,11 @@ public ResponseEntity webClientResponse(final WebClientResponseEx .body(new ErrorResponse(e.getMessage())); } - // @ExceptionHandler(EntityNotFoundException.class) - // public ResponseEntity entityNotFound(final EntityNotFoundException e) { - // return ResponseEntity.status(HttpStatus.BAD_REQUEST) - // .body(new ErrorResponse(e.getMessage())); - // } + @ExceptionHandler(EntityNotFoundException.class) + public ResponseEntity entityNotFound(final EntityNotFoundException e) { + return ResponseEntity.status(HttpStatus.BAD_REQUEST) + .body(new ErrorResponse(e.getMessage())); + } @ExceptionHandler(AuthorityException.class) public ResponseEntity authority(final AuthorityException e) { diff --git a/backend/src/test/java/com/twtw/backend/domain/place/controller/PlaceControllerTest.java b/backend/src/test/java/com/twtw/backend/domain/place/controller/PlaceControllerTest.java index 71c85fa8..df46e8f7 100644 --- a/backend/src/test/java/com/twtw/backend/domain/place/controller/PlaceControllerTest.java +++ b/backend/src/test/java/com/twtw/backend/domain/place/controller/PlaceControllerTest.java @@ -61,8 +61,8 @@ void searchSurroundPlace() throws Exception { final ResultActions perform = mockMvc.perform( get("/places/surround") - .queryParam("x", "127.426") - .queryParam("y", "37.0764") + .queryParam("longitude", "127.426") + .queryParam("latitude", "37.0764") .queryParam("page", "1") .contentType(MediaType.APPLICATION_JSON) .header( diff --git a/backend/src/test/java/com/twtw/backend/domain/plan/controller/PlanControllerTest.java b/backend/src/test/java/com/twtw/backend/domain/plan/controller/PlanControllerTest.java index ebef49f3..630a04be 100644 --- a/backend/src/test/java/com/twtw/backend/domain/plan/controller/PlanControllerTest.java +++ b/backend/src/test/java/com/twtw/backend/domain/plan/controller/PlanControllerTest.java @@ -72,8 +72,8 @@ void searchPlanDestination() throws Exception { mockMvc.perform( get("/plans/search/destination") .queryParam("query", "이디야 안성") - .queryParam("x", "127.426") - .queryParam("y", "37.0764") + .queryParam("longitude", "127.426") + .queryParam("latitude", "37.0764") .queryParam("page", "1") .queryParam("categoryGroupCode", "CE7") .contentType(MediaType.APPLICATION_JSON) diff --git a/docker-compose.yml b/docker-compose.yml index e7eb5c28..4de58468 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,7 @@ services: - backend depends_on: - db + - rabbitmq env_file: .env restart: always tty: true @@ -23,7 +24,7 @@ services: environment: TZ: Asia/Seoul volumes: - - data_db:/var/lib/mysql + - ./data:/var/lib/mysql networks: - backend restart: always @@ -78,7 +79,7 @@ services: - backend volumes: - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml - - data-prometheus:/prometheus + - ./tmp/promtheus:/prometheus grafana: image: grafana/grafana @@ -94,5 +95,4 @@ networks: volumes: data_rabbitmq: null - data_db: null data-prometheus: null