diff --git a/Server/src/main/java/JGS/CasperEvent/domain/event/repository/eventRepository/RushEventRepository.java b/Server/src/main/java/JGS/CasperEvent/domain/event/repository/eventRepository/RushEventRepository.java index 1913977f..797b3926 100644 --- a/Server/src/main/java/JGS/CasperEvent/domain/event/repository/eventRepository/RushEventRepository.java +++ b/Server/src/main/java/JGS/CasperEvent/domain/event/repository/eventRepository/RushEventRepository.java @@ -11,7 +11,7 @@ @Repository public interface RushEventRepository extends JpaRepository { - @Query("SELECT e FROM RushEvent e WHERE DATE(e.startDateTime) = :eventDate") + @Query("SELECT e FROM RushEvent e WHERE DATE(CONVERT_TZ(e.startDateTime, '+00:00', '+09:00')) = :eventDate") List findByEventDate(@Param("eventDate") LocalDate eventDate); RushEvent findByRushEventId(Long rushEventId); diff --git a/Server/src/main/java/JGS/CasperEvent/global/error/GlobalExceptionHandler.java b/Server/src/main/java/JGS/CasperEvent/global/error/GlobalExceptionHandler.java index df0cc858..ce2addb4 100644 --- a/Server/src/main/java/JGS/CasperEvent/global/error/GlobalExceptionHandler.java +++ b/Server/src/main/java/JGS/CasperEvent/global/error/GlobalExceptionHandler.java @@ -17,7 +17,7 @@ public class GlobalExceptionHandler { @ExceptionHandler(CustomException.class) public ResponseEntity handler(CustomException e){ - log.error("CustomException [{}]", e.getMessage(), e); + log.error("CustomException: {} {}", e.getErrorCode(), e.getMessage()); return ResponseEntity .status(HttpStatus.valueOf(e.getErrorCode().getStatus())) .body(ErrorResponse.of(e.getErrorCode(), e.getMessage())); @@ -25,7 +25,7 @@ public ResponseEntity handler(CustomException e){ @ExceptionHandler(MethodArgumentNotValidException.class) public ResponseEntity methodArgumentNotValidExceptionHandler(MethodArgumentNotValidException e){ - log.error("MethodArgumentNotValidException [{}]", e.getMessage(), e); + log.error("MethodArgumentNotValidException: [{}]", e.getMessage()); BindingResult bindingResult = e.getBindingResult(); StringBuilder builder = new StringBuilder(); @@ -43,7 +43,7 @@ public ResponseEntity methodArgumentNotValidExceptionHandler(Meth @ExceptionHandler(RuntimeException.class) public ResponseEntity runtimeExceptionHandler(RuntimeException e){ - log.error("RuntimeException [{}]", e.getMessage(), e); + log.error("RuntimeException: [{}]", e.getMessage()); return ResponseEntity .status(HttpStatus.BAD_REQUEST) .body(ErrorResponse.of(CustomErrorCode.BAD_REQUEST, e.getMessage())); @@ -51,7 +51,7 @@ public ResponseEntity runtimeExceptionHandler(RuntimeException e) @ExceptionHandler(JDBCConnectionException.class) public ResponseEntity handleJDBCConnectionException(JDBCConnectionException e) { - log.error("데이터베이스 연결 에러 [{}]", e.getMessage(), e); + log.error("JDBCConnectionException: [{}]", e.getMessage()); return ResponseEntity .status(HttpStatus.BAD_REQUEST) .body(ErrorResponse.of(CustomErrorCode.BAD_REQUEST, e.getMessage())); @@ -60,7 +60,7 @@ public ResponseEntity handleJDBCConnectionException(JDBCConnectio @ExceptionHandler(Exception.class) public ResponseEntity handleAllExceptions(Exception e) { - log.error("예외 발생 [{}] ", e.getMessage(), e); + log.error("Exception: {}", e.getMessage()); return ResponseEntity .status(HttpStatus.BAD_REQUEST) .body(ErrorResponse.of(CustomErrorCode.BAD_REQUEST, e.getMessage()));