Skip to content

Commit

Permalink
Merge pull request #215 from softeerbootcamp4th/feature/#203-rush-eve…
Browse files Browse the repository at this point in the history
…nt-apply-stress-test

Feature/#203 rush event apply stress test
  • Loading branch information
wjddn2165 authored Aug 21, 2024
2 parents fe7937e + 7fc7f05 commit d82b4be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@Repository
public interface RushEventRepository extends JpaRepository<RushEvent, Long> {
@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<RushEvent> findByEventDate(@Param("eventDate") LocalDate eventDate);

RushEvent findByRushEventId(Long rushEventId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ public class GlobalExceptionHandler {

@ExceptionHandler(CustomException.class)
public ResponseEntity<ErrorResponse> 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()));
}

@ExceptionHandler(MethodArgumentNotValidException.class)
public ResponseEntity<ErrorResponse> methodArgumentNotValidExceptionHandler(MethodArgumentNotValidException e){
log.error("MethodArgumentNotValidException [{}]", e.getMessage(), e);
log.error("MethodArgumentNotValidException: [{}]", e.getMessage());

BindingResult bindingResult = e.getBindingResult();
StringBuilder builder = new StringBuilder();
Expand All @@ -43,15 +43,15 @@ public ResponseEntity<ErrorResponse> methodArgumentNotValidExceptionHandler(Meth

@ExceptionHandler(RuntimeException.class)
public ResponseEntity<ErrorResponse> 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()));
}

@ExceptionHandler(JDBCConnectionException.class)
public ResponseEntity<ErrorResponse> 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()));
Expand All @@ -60,7 +60,7 @@ public ResponseEntity<ErrorResponse> handleJDBCConnectionException(JDBCConnectio

@ExceptionHandler(Exception.class)
public ResponseEntity<ErrorResponse> 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()));
Expand Down

0 comments on commit d82b4be

Please sign in to comment.