diff --git a/src/main/java/com/bio/bio_backend/global/exception/GlobalExceptionHandler.java b/src/main/java/com/bio/bio_backend/global/exception/GlobalExceptionHandler.java index e1ccf03..3b41735 100644 --- a/src/main/java/com/bio/bio_backend/global/exception/GlobalExceptionHandler.java +++ b/src/main/java/com/bio/bio_backend/global/exception/GlobalExceptionHandler.java @@ -31,6 +31,9 @@ public class GlobalExceptionHandler { return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(response); } + // 검증 오류 상세 정보를 위한 내부 클래스 + private record ValidationError(String field, String message) {} + @ExceptionHandler(Exception.class) public ResponseEntity> handleException(Exception e) { log.error("Unexpected error occurred", e); @@ -38,7 +41,4 @@ public class GlobalExceptionHandler { ApiResponseDto response = ApiResponseDto.fail(ApiResponseCode.COMMON_INTERNAL_SERVER_ERROR); return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(response); } - - // 검증 오류 상세 정보를 위한 내부 클래스 - private record ValidationError(String field, String message) { } } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 1183039..ca3c378 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -19,10 +19,15 @@ spring.datasource.url=jdbc:postgresql://stam.kr:15432/imas spring.datasource.username=imas_user spring.datasource.password=stam1201 spring.datasource.driver-class-name=org.postgresql.Driver +# 운영 환경 변수 설정 필요 +# spring.datasource.url=${DB_URL:} +# spring.datasource.username=${DB_USERNAME:} +# spring.datasource.password=${DB_PASSWORD:} # ======================================== # JPA/Hibernate 설정 # ======================================== +# 개발 환경 설정 spring.jpa.hibernate.ddl-auto=none spring.jpa.open-in-view=false spring.jpa.show-sql=false @@ -30,6 +35,12 @@ spring.jpa.properties.hibernate.format_sql=true spring.jpa.properties.hibernate.highlight_sql=true spring.jpa.properties.hibernate.use_sql_comments=false +# 배치 처리 설정 +spring.jpa.properties.hibernate.default_batch_fetch_size=100 +spring.jpa.properties.hibernate.jdbc.batch_size=100 +spring.jpa.properties.hibernate.order_inserts=true +spring.jpa.properties.hibernate.order_updates=true + # 스키마 생성 설정 spring.jpa.properties.javax.persistence.schema-generation.scripts.action=create spring.jpa.properties.javax.persistence.schema-generation.scripts.create-target=ddl/schema.sql @@ -83,6 +94,10 @@ decorator.datasource.p6spy.log-format=%(sqlSingleLine) token.expiration_time_access=900000 token.expiration_time_refresh=604800000 token.secret_key=c3RhbV9qd3Rfc2VjcmV0X3Rva2Vuc3RhbV9qd3Rfc2VjcmV0X3RhbV9qd3Rfc2VjcmV0X3RhbV9qd3Rfc2VjcmV0X3Rva2Vu +# 운영 환경 변수 설정 필요 +# token.secret_key=${JWT_SECRET_KEY:} + + # ======================================== # Swagger 설정