diff --git a/src/main/java/com/potatocake/everymoment/repository/MemberRepository.java b/src/main/java/com/potatocake/everymoment/repository/MemberRepository.java index 7f318ed..6e2e1e7 100644 --- a/src/main/java/com/potatocake/everymoment/repository/MemberRepository.java +++ b/src/main/java/com/potatocake/everymoment/repository/MemberRepository.java @@ -1,13 +1,11 @@ package com.potatocake.everymoment.repository; import com.potatocake.everymoment.entity.Member; -import jakarta.persistence.LockModeType; import java.util.Optional; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.ScrollPosition; import org.springframework.data.domain.Window; import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.Lock; import org.springframework.data.jpa.repository.Query; public interface MemberRepository extends JpaRepository { @@ -18,7 +16,6 @@ public interface MemberRepository extends JpaRepository { Window findByNicknameContaining(String nickname, ScrollPosition position, Pageable pageable); - @Lock(LockModeType.PESSIMISTIC_WRITE) @Query("SELECT CASE WHEN MIN(m.number) > 0 OR MIN(m.number) IS NULL THEN -1 ELSE MIN(m.number) - 1 END FROM Member m") Long findNextAnonymousNumber(); diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 0c6cad9..6626737 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -9,6 +9,8 @@ spring: hibernate: jdbc: time_zone: Asia/Seoul + format_sql: true + show-sql: true hibernate: ddl-auto: none @@ -22,6 +24,14 @@ spring: max-request-size: 25MB resolve-lazily: true +logging: + level: + org: + hibernate: + orm: + jdbc: + bind: trace + aws: s3: client: AmazonS3