diff --git a/src/main/java/LlikelionKNU/KNUfest/domain/booth/service/BoothServiceImpl.java b/src/main/java/LlikelionKNU/KNUfest/domain/booth/service/BoothServiceImpl.java index 11e4327..18989ff 100644 --- a/src/main/java/LlikelionKNU/KNUfest/domain/booth/service/BoothServiceImpl.java +++ b/src/main/java/LlikelionKNU/KNUfest/domain/booth/service/BoothServiceImpl.java @@ -12,6 +12,7 @@ import LlikelionKNU.KNUfest.domain.user.repository.UserBoothRepository; import LlikelionKNU.KNUfest.domain.user.service.UserService; import LlikelionKNU.KNUfest.global.error.NoExistException; +import jakarta.transaction.Transactional; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -20,6 +21,7 @@ import java.util.Optional; @Service +@Transactional @RequiredArgsConstructor public class BoothServiceImpl implements BoothService{ diff --git a/src/main/java/LlikelionKNU/KNUfest/domain/comment/service/CommentServiceImpl.java b/src/main/java/LlikelionKNU/KNUfest/domain/comment/service/CommentServiceImpl.java index 7bd8ad1..302e4aa 100644 --- a/src/main/java/LlikelionKNU/KNUfest/domain/comment/service/CommentServiceImpl.java +++ b/src/main/java/LlikelionKNU/KNUfest/domain/comment/service/CommentServiceImpl.java @@ -10,6 +10,7 @@ import LlikelionKNU.KNUfest.domain.user.service.UserService; import LlikelionKNU.KNUfest.global.error.NoExistException; import LlikelionKNU.KNUfest.global.error.UserHashWrongException; +import jakarta.transaction.Transactional; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -18,6 +19,7 @@ import java.util.Optional; @Service +@Transactional @RequiredArgsConstructor public class CommentServiceImpl implements CommentService{ private final CommentRepository commentRepository; diff --git a/src/main/java/LlikelionKNU/KNUfest/domain/user/service/UserCountServiceImpl.java b/src/main/java/LlikelionKNU/KNUfest/domain/user/service/UserCountServiceImpl.java index 5c432a6..b33673f 100644 --- a/src/main/java/LlikelionKNU/KNUfest/domain/user/service/UserCountServiceImpl.java +++ b/src/main/java/LlikelionKNU/KNUfest/domain/user/service/UserCountServiceImpl.java @@ -3,12 +3,14 @@ import LlikelionKNU.KNUfest.domain.user.entity.UserCountEntity; import LlikelionKNU.KNUfest.domain.user.repository.UserCountRepository; import LlikelionKNU.KNUfest.global.error.NoExistException; +import jakarta.transaction.Transactional; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import java.util.Optional; @Service +@Transactional @RequiredArgsConstructor public class UserCountServiceImpl implements UserCountService { private final UserCountRepository userCountRepository; diff --git a/src/main/java/LlikelionKNU/KNUfest/domain/user/service/UserServiceImpl.java b/src/main/java/LlikelionKNU/KNUfest/domain/user/service/UserServiceImpl.java index a395d3d..2d18d21 100644 --- a/src/main/java/LlikelionKNU/KNUfest/domain/user/service/UserServiceImpl.java +++ b/src/main/java/LlikelionKNU/KNUfest/domain/user/service/UserServiceImpl.java @@ -5,12 +5,14 @@ import LlikelionKNU.KNUfest.domain.user.repository.UserCountRepository; import LlikelionKNU.KNUfest.domain.user.repository.UserRepository; import LlikelionKNU.KNUfest.global.error.NoExistException; +import jakarta.transaction.Transactional; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import java.util.Optional; @Service +@Transactional @RequiredArgsConstructor public class UserServiceImpl implements UserService{ private final UserRepository userRepository; diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index c35c147..f85324e 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,8 +1,8 @@ spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://mysql-withvol:3306/knufest?serverTimezone=Asia/Seoul - username: user + url: jdbc:mysql://localhost:3306/knufest?serverTimezone=Asia/Seoul + username: root password: 1234 jpa: