From 368494fa6643964146be005b1e6cf7d9f290c106 Mon Sep 17 00:00:00 2001 From: Changyu Shin Date: Thu, 11 Jul 2024 14:52:42 +0900 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20repository=20=EC=9D=B8=ED=84=B0?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=8A=A4=EB=A5=BC=20domain=20=ED=8C=A8?= =?UTF-8?q?=ED=82=A4=EC=A7=80=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../getp/domain/auth/application/AuthService.java | 2 +- .../auth/application/EmailVerificationService.java | 2 +- .../EmailVerificationRepository.java | 3 +-- .../TokenVerificationRepository.java | 3 +-- .../getp/domain/client/application/ClientService.java | 2 +- .../{repository => domain}/ClientRepository.java | 3 +-- .../getp/domain/member/application/MemberService.java | 2 +- .../{repository => domain}/MemberRepository.java | 6 +++--- .../domain/people/application/PeopleLikeService.java | 2 +- .../people/application/PeopleProfileService.java | 2 +- .../getp/domain/people/application/PeopleService.java | 2 +- .../{repository => domain}/PeopleLikeRepository.java | 3 +-- .../PeopleProfileRepository.java | 5 ++--- .../{repository => domain}/PeopleRepository.java | 7 ++++--- .../PeopleQueryDslRepository.java | 4 ++-- .../PeopleQueryDslRepositoryImpl.java | 2 +- .../project/application/ProjectApplicationService.java | 2 +- .../domain/project/application/ProjectLikeService.java | 2 +- .../domain/project/application/ProjectService.java | 2 +- .../ProjectApplicationRepository.java | 3 +-- .../{repository => domain}/ProjectLikeRepository.java | 3 +-- .../{repository => domain}/ProjectRepository.java | 4 ++-- .../ProjectQueryDslRepository.java | 2 +- .../ProjectQueryDslRepositoryImpl.java | 2 +- .../auth/application/EmailVerificationServiceTest.java | 2 +- .../domain/client/application/ClientServiceTest.java | 2 +- .../domain/member/application/MemberServiceTest.java | 2 +- .../people/application/PeopleLikeServiceTest.java | 2 +- .../people/application/PeopleProfileServiceTest.java | 4 ++-- .../domain/people/application/PeopleServiceTest.java | 2 +- .../PeopleLikeRepositoryTest.java | 8 +++++--- .../{repository => infra}/PeopleRepositoryTest.java | 5 +++-- .../application/ProjectApplicationServiceTest.java | 2 +- .../project/application/ProjectLikeServiceTest.java | 2 +- .../domain/project/application/ProjectServiceTest.java | 2 +- .../ProjectLikeRepositoryTest.java | 10 ++++++---- 36 files changed, 56 insertions(+), 57 deletions(-) rename src/main/java/es/princip/getp/domain/auth/{repository => domain}/EmailVerificationRepository.java (61%) rename src/main/java/es/princip/getp/domain/auth/{repository => domain}/TokenVerificationRepository.java (67%) rename src/main/java/es/princip/getp/domain/client/{repository => domain}/ClientRepository.java (68%) rename src/main/java/es/princip/getp/domain/member/{repository => domain}/MemberRepository.java (71%) rename src/main/java/es/princip/getp/domain/people/{repository => domain}/PeopleLikeRepository.java (77%) rename src/main/java/es/princip/getp/domain/people/{repository => domain}/PeopleProfileRepository.java (86%) rename src/main/java/es/princip/getp/domain/people/{repository => domain}/PeopleRepository.java (72%) rename src/main/java/es/princip/getp/domain/people/{repository => infra}/PeopleQueryDslRepository.java (85%) rename src/main/java/es/princip/getp/domain/people/{repository => infra}/PeopleQueryDslRepositoryImpl.java (99%) rename src/main/java/es/princip/getp/domain/project/{repository => domain}/ProjectApplicationRepository.java (58%) rename src/main/java/es/princip/getp/domain/project/{repository => domain}/ProjectLikeRepository.java (68%) rename src/main/java/es/princip/getp/domain/project/{repository => domain}/ProjectRepository.java (65%) rename src/main/java/es/princip/getp/domain/project/{repository => infra}/ProjectQueryDslRepository.java (83%) rename src/main/java/es/princip/getp/domain/project/{repository => infra}/ProjectQueryDslRepositoryImpl.java (96%) rename src/test/java/es/princip/getp/domain/people/{repository => infra}/PeopleLikeRepositoryTest.java (91%) rename src/test/java/es/princip/getp/domain/people/{repository => infra}/PeopleRepositoryTest.java (91%) rename src/test/java/es/princip/getp/domain/project/{repository => infra}/ProjectLikeRepositoryTest.java (90%) diff --git a/src/main/java/es/princip/getp/domain/auth/application/AuthService.java b/src/main/java/es/princip/getp/domain/auth/application/AuthService.java index 60e6178e..41e08d4e 100644 --- a/src/main/java/es/princip/getp/domain/auth/application/AuthService.java +++ b/src/main/java/es/princip/getp/domain/auth/application/AuthService.java @@ -1,11 +1,11 @@ package es.princip.getp.domain.auth.application; import es.princip.getp.domain.auth.domain.TokenVerification; +import es.princip.getp.domain.auth.domain.TokenVerificationRepository; import es.princip.getp.domain.auth.dto.request.LoginRequest; import es.princip.getp.domain.auth.dto.response.Token; import es.princip.getp.domain.auth.exception.LoginErrorCode; import es.princip.getp.domain.auth.exception.TokenErrorCode; -import es.princip.getp.domain.auth.repository.TokenVerificationRepository; import es.princip.getp.domain.member.application.MemberService; import es.princip.getp.infra.exception.BusinessLogicException; import es.princip.getp.infra.security.details.PrincipalDetails; diff --git a/src/main/java/es/princip/getp/domain/auth/application/EmailVerificationService.java b/src/main/java/es/princip/getp/domain/auth/application/EmailVerificationService.java index 771da41b..47e800ff 100644 --- a/src/main/java/es/princip/getp/domain/auth/application/EmailVerificationService.java +++ b/src/main/java/es/princip/getp/domain/auth/application/EmailVerificationService.java @@ -1,8 +1,8 @@ package es.princip.getp.domain.auth.application; import es.princip.getp.domain.auth.domain.EmailVerification; +import es.princip.getp.domain.auth.domain.EmailVerificationRepository; import es.princip.getp.domain.auth.exception.EmailVerificationErrorCode; -import es.princip.getp.domain.auth.repository.EmailVerificationRepository; import es.princip.getp.infra.exception.BusinessLogicException; import es.princip.getp.infra.util.RandomUtil; import org.springframework.beans.factory.annotation.Value; diff --git a/src/main/java/es/princip/getp/domain/auth/repository/EmailVerificationRepository.java b/src/main/java/es/princip/getp/domain/auth/domain/EmailVerificationRepository.java similarity index 61% rename from src/main/java/es/princip/getp/domain/auth/repository/EmailVerificationRepository.java rename to src/main/java/es/princip/getp/domain/auth/domain/EmailVerificationRepository.java index c0b981bf..4edfff2c 100644 --- a/src/main/java/es/princip/getp/domain/auth/repository/EmailVerificationRepository.java +++ b/src/main/java/es/princip/getp/domain/auth/domain/EmailVerificationRepository.java @@ -1,6 +1,5 @@ -package es.princip.getp.domain.auth.repository; +package es.princip.getp.domain.auth.domain; -import es.princip.getp.domain.auth.domain.EmailVerification; import org.springframework.data.keyvalue.repository.KeyValueRepository; public interface EmailVerificationRepository extends KeyValueRepository { diff --git a/src/main/java/es/princip/getp/domain/auth/repository/TokenVerificationRepository.java b/src/main/java/es/princip/getp/domain/auth/domain/TokenVerificationRepository.java similarity index 67% rename from src/main/java/es/princip/getp/domain/auth/repository/TokenVerificationRepository.java rename to src/main/java/es/princip/getp/domain/auth/domain/TokenVerificationRepository.java index ec2d8933..7ab5fcbc 100644 --- a/src/main/java/es/princip/getp/domain/auth/repository/TokenVerificationRepository.java +++ b/src/main/java/es/princip/getp/domain/auth/domain/TokenVerificationRepository.java @@ -1,6 +1,5 @@ -package es.princip.getp.domain.auth.repository; +package es.princip.getp.domain.auth.domain; -import es.princip.getp.domain.auth.domain.TokenVerification; import org.springframework.data.keyvalue.repository.KeyValueRepository; public interface TokenVerificationRepository extends KeyValueRepository { diff --git a/src/main/java/es/princip/getp/domain/client/application/ClientService.java b/src/main/java/es/princip/getp/domain/client/application/ClientService.java index 0e0d5246..1058bf52 100644 --- a/src/main/java/es/princip/getp/domain/client/application/ClientService.java +++ b/src/main/java/es/princip/getp/domain/client/application/ClientService.java @@ -1,10 +1,10 @@ package es.princip.getp.domain.client.application; import es.princip.getp.domain.client.domain.Client; +import es.princip.getp.domain.client.domain.ClientRepository; import es.princip.getp.domain.client.dto.request.CreateClientRequest; import es.princip.getp.domain.client.dto.request.UpdateClientRequest; import es.princip.getp.domain.client.exception.ClientErrorCode; -import es.princip.getp.domain.client.repository.ClientRepository; import es.princip.getp.domain.member.application.MemberService; import es.princip.getp.domain.member.dto.request.UpdateMemberRequest; import es.princip.getp.infra.exception.BusinessLogicException; diff --git a/src/main/java/es/princip/getp/domain/client/repository/ClientRepository.java b/src/main/java/es/princip/getp/domain/client/domain/ClientRepository.java similarity index 68% rename from src/main/java/es/princip/getp/domain/client/repository/ClientRepository.java rename to src/main/java/es/princip/getp/domain/client/domain/ClientRepository.java index 216741f3..8a469227 100644 --- a/src/main/java/es/princip/getp/domain/client/repository/ClientRepository.java +++ b/src/main/java/es/princip/getp/domain/client/domain/ClientRepository.java @@ -1,6 +1,5 @@ -package es.princip.getp.domain.client.repository; +package es.princip.getp.domain.client.domain; -import es.princip.getp.domain.client.domain.Client; import org.springframework.data.jpa.repository.JpaRepository; import java.util.Optional; diff --git a/src/main/java/es/princip/getp/domain/member/application/MemberService.java b/src/main/java/es/princip/getp/domain/member/application/MemberService.java index 240772d9..8a55f999 100644 --- a/src/main/java/es/princip/getp/domain/member/application/MemberService.java +++ b/src/main/java/es/princip/getp/domain/member/application/MemberService.java @@ -2,10 +2,10 @@ import es.princip.getp.domain.auth.exception.SignUpErrorCode; import es.princip.getp.domain.member.domain.Member; +import es.princip.getp.domain.member.domain.MemberRepository; import es.princip.getp.domain.member.dto.request.CreateMemberRequest; import es.princip.getp.domain.member.dto.request.UpdateMemberRequest; import es.princip.getp.domain.member.exception.MemberErrorCode; -import es.princip.getp.domain.member.repository.MemberRepository; import es.princip.getp.domain.serviceTerm.application.ServiceTermService; import es.princip.getp.domain.serviceTerm.domain.ServiceTerm; import es.princip.getp.domain.serviceTerm.domain.ServiceTermAgreement; diff --git a/src/main/java/es/princip/getp/domain/member/repository/MemberRepository.java b/src/main/java/es/princip/getp/domain/member/domain/MemberRepository.java similarity index 71% rename from src/main/java/es/princip/getp/domain/member/repository/MemberRepository.java rename to src/main/java/es/princip/getp/domain/member/domain/MemberRepository.java index 3c64eb52..34bbecf5 100644 --- a/src/main/java/es/princip/getp/domain/member/repository/MemberRepository.java +++ b/src/main/java/es/princip/getp/domain/member/domain/MemberRepository.java @@ -1,8 +1,8 @@ -package es.princip.getp.domain.member.repository; +package es.princip.getp.domain.member.domain; -import java.util.Optional; import org.springframework.data.jpa.repository.JpaRepository; -import es.princip.getp.domain.member.domain.Member; + +import java.util.Optional; public interface MemberRepository extends JpaRepository { boolean existsByEmail(String email); diff --git a/src/main/java/es/princip/getp/domain/people/application/PeopleLikeService.java b/src/main/java/es/princip/getp/domain/people/application/PeopleLikeService.java index 49cabd97..44fd6360 100644 --- a/src/main/java/es/princip/getp/domain/people/application/PeopleLikeService.java +++ b/src/main/java/es/princip/getp/domain/people/application/PeopleLikeService.java @@ -4,8 +4,8 @@ import es.princip.getp.domain.client.domain.Client; import es.princip.getp.domain.people.domain.People; import es.princip.getp.domain.people.domain.PeopleLike; +import es.princip.getp.domain.people.domain.PeopleLikeRepository; import es.princip.getp.domain.people.exception.PeopleLikeErrorCode; -import es.princip.getp.domain.people.repository.PeopleLikeRepository; import es.princip.getp.infra.exception.BusinessLogicException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/es/princip/getp/domain/people/application/PeopleProfileService.java b/src/main/java/es/princip/getp/domain/people/application/PeopleProfileService.java index 200b0bd4..2c104c22 100644 --- a/src/main/java/es/princip/getp/domain/people/application/PeopleProfileService.java +++ b/src/main/java/es/princip/getp/domain/people/application/PeopleProfileService.java @@ -2,10 +2,10 @@ import es.princip.getp.domain.people.domain.People; import es.princip.getp.domain.people.domain.PeopleProfile; +import es.princip.getp.domain.people.domain.PeopleProfileRepository; import es.princip.getp.domain.people.dto.request.CreatePeopleProfileRequest; import es.princip.getp.domain.people.dto.request.UpdatePeopleProfileRequest; import es.princip.getp.domain.people.exception.PeopleProfileErrorCode; -import es.princip.getp.domain.people.repository.PeopleProfileRepository; import es.princip.getp.infra.exception.BusinessLogicException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/es/princip/getp/domain/people/application/PeopleService.java b/src/main/java/es/princip/getp/domain/people/application/PeopleService.java index df4821ac..b5a7f21c 100644 --- a/src/main/java/es/princip/getp/domain/people/application/PeopleService.java +++ b/src/main/java/es/princip/getp/domain/people/application/PeopleService.java @@ -3,11 +3,11 @@ import es.princip.getp.domain.member.application.MemberService; import es.princip.getp.domain.member.dto.request.UpdateMemberRequest; import es.princip.getp.domain.people.domain.People; +import es.princip.getp.domain.people.domain.PeopleRepository; import es.princip.getp.domain.people.dto.request.CreatePeopleRequest; import es.princip.getp.domain.people.dto.request.UpdatePeopleRequest; import es.princip.getp.domain.people.dto.response.people.CardPeopleResponse; import es.princip.getp.domain.people.exception.PeopleErrorCode; -import es.princip.getp.domain.people.repository.PeopleRepository; import es.princip.getp.infra.exception.BusinessLogicException; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; diff --git a/src/main/java/es/princip/getp/domain/people/repository/PeopleLikeRepository.java b/src/main/java/es/princip/getp/domain/people/domain/PeopleLikeRepository.java similarity index 77% rename from src/main/java/es/princip/getp/domain/people/repository/PeopleLikeRepository.java rename to src/main/java/es/princip/getp/domain/people/domain/PeopleLikeRepository.java index c9147825..20408a67 100644 --- a/src/main/java/es/princip/getp/domain/people/repository/PeopleLikeRepository.java +++ b/src/main/java/es/princip/getp/domain/people/domain/PeopleLikeRepository.java @@ -1,6 +1,5 @@ -package es.princip.getp.domain.people.repository; +package es.princip.getp.domain.people.domain; -import es.princip.getp.domain.people.domain.PeopleLike; import org.springframework.data.jpa.repository.JpaRepository; import java.util.Optional; diff --git a/src/main/java/es/princip/getp/domain/people/repository/PeopleProfileRepository.java b/src/main/java/es/princip/getp/domain/people/domain/PeopleProfileRepository.java similarity index 86% rename from src/main/java/es/princip/getp/domain/people/repository/PeopleProfileRepository.java rename to src/main/java/es/princip/getp/domain/people/domain/PeopleProfileRepository.java index f5c8d989..c023c9c5 100644 --- a/src/main/java/es/princip/getp/domain/people/repository/PeopleProfileRepository.java +++ b/src/main/java/es/princip/getp/domain/people/domain/PeopleProfileRepository.java @@ -1,11 +1,10 @@ -package es.princip.getp.domain.people.repository; +package es.princip.getp.domain.people.domain; -import java.util.Optional; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; -import es.princip.getp.domain.people.domain.PeopleProfile; +import java.util.Optional; public interface PeopleProfileRepository extends JpaRepository { Optional findByPeople_PeopleId(Long peopleId); diff --git a/src/main/java/es/princip/getp/domain/people/repository/PeopleRepository.java b/src/main/java/es/princip/getp/domain/people/domain/PeopleRepository.java similarity index 72% rename from src/main/java/es/princip/getp/domain/people/repository/PeopleRepository.java rename to src/main/java/es/princip/getp/domain/people/domain/PeopleRepository.java index 9d162fcc..0695f0ad 100644 --- a/src/main/java/es/princip/getp/domain/people/repository/PeopleRepository.java +++ b/src/main/java/es/princip/getp/domain/people/domain/PeopleRepository.java @@ -1,10 +1,11 @@ -package es.princip.getp.domain.people.repository; +package es.princip.getp.domain.people.domain; -import es.princip.getp.domain.people.domain.People; -import java.util.Optional; +import es.princip.getp.domain.people.infra.PeopleQueryDslRepository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; +import java.util.Optional; + @Repository public interface PeopleRepository extends JpaRepository, PeopleQueryDslRepository { Optional findByMember_MemberId(Long memberId); diff --git a/src/main/java/es/princip/getp/domain/people/repository/PeopleQueryDslRepository.java b/src/main/java/es/princip/getp/domain/people/infra/PeopleQueryDslRepository.java similarity index 85% rename from src/main/java/es/princip/getp/domain/people/repository/PeopleQueryDslRepository.java rename to src/main/java/es/princip/getp/domain/people/infra/PeopleQueryDslRepository.java index 1c3d6d48..c5198218 100644 --- a/src/main/java/es/princip/getp/domain/people/repository/PeopleQueryDslRepository.java +++ b/src/main/java/es/princip/getp/domain/people/infra/PeopleQueryDslRepository.java @@ -1,8 +1,8 @@ -package es.princip.getp.domain.people.repository; +package es.princip.getp.domain.people.infra; +import es.princip.getp.domain.people.dto.response.people.CardPeopleResponse; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; -import es.princip.getp.domain.people.dto.response.people.CardPeopleResponse; public interface PeopleQueryDslRepository { diff --git a/src/main/java/es/princip/getp/domain/people/repository/PeopleQueryDslRepositoryImpl.java b/src/main/java/es/princip/getp/domain/people/infra/PeopleQueryDslRepositoryImpl.java similarity index 99% rename from src/main/java/es/princip/getp/domain/people/repository/PeopleQueryDslRepositoryImpl.java rename to src/main/java/es/princip/getp/domain/people/infra/PeopleQueryDslRepositoryImpl.java index e1dce1c6..305697f3 100644 --- a/src/main/java/es/princip/getp/domain/people/repository/PeopleQueryDslRepositoryImpl.java +++ b/src/main/java/es/princip/getp/domain/people/infra/PeopleQueryDslRepositoryImpl.java @@ -1,4 +1,4 @@ -package es.princip.getp.domain.people.repository; +package es.princip.getp.domain.people.infra; import com.querydsl.core.Tuple; import com.querydsl.core.types.OrderSpecifier; diff --git a/src/main/java/es/princip/getp/domain/project/application/ProjectApplicationService.java b/src/main/java/es/princip/getp/domain/project/application/ProjectApplicationService.java index 49521824..5e103de5 100644 --- a/src/main/java/es/princip/getp/domain/project/application/ProjectApplicationService.java +++ b/src/main/java/es/princip/getp/domain/project/application/ProjectApplicationService.java @@ -4,8 +4,8 @@ import es.princip.getp.domain.people.domain.People; import es.princip.getp.domain.project.domain.Project; import es.princip.getp.domain.project.domain.ProjectApplication; +import es.princip.getp.domain.project.domain.ProjectApplicationRepository; import es.princip.getp.domain.project.dto.request.ApplicateProjectRequest; -import es.princip.getp.domain.project.repository.ProjectApplicationRepository; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/es/princip/getp/domain/project/application/ProjectLikeService.java b/src/main/java/es/princip/getp/domain/project/application/ProjectLikeService.java index ef2206a1..52a739eb 100644 --- a/src/main/java/es/princip/getp/domain/project/application/ProjectLikeService.java +++ b/src/main/java/es/princip/getp/domain/project/application/ProjectLikeService.java @@ -4,8 +4,8 @@ import es.princip.getp.domain.people.domain.People; import es.princip.getp.domain.project.domain.Project; import es.princip.getp.domain.project.domain.ProjectLike; +import es.princip.getp.domain.project.domain.ProjectLikeRepository; import es.princip.getp.domain.project.exception.ProjectLikeErrorCode; -import es.princip.getp.domain.project.repository.ProjectLikeRepository; import es.princip.getp.infra.exception.BusinessLogicException; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/es/princip/getp/domain/project/application/ProjectService.java b/src/main/java/es/princip/getp/domain/project/application/ProjectService.java index c20a8f59..1bf4a26a 100644 --- a/src/main/java/es/princip/getp/domain/project/application/ProjectService.java +++ b/src/main/java/es/princip/getp/domain/project/application/ProjectService.java @@ -3,9 +3,9 @@ import es.princip.getp.domain.client.application.ClientService; import es.princip.getp.domain.client.domain.Client; import es.princip.getp.domain.project.domain.Project; +import es.princip.getp.domain.project.domain.ProjectRepository; import es.princip.getp.domain.project.dto.request.CreateProjectRequest; import es.princip.getp.domain.project.exception.ProjectErrorCode; -import es.princip.getp.domain.project.repository.ProjectRepository; import es.princip.getp.infra.exception.BusinessLogicException; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; diff --git a/src/main/java/es/princip/getp/domain/project/repository/ProjectApplicationRepository.java b/src/main/java/es/princip/getp/domain/project/domain/ProjectApplicationRepository.java similarity index 58% rename from src/main/java/es/princip/getp/domain/project/repository/ProjectApplicationRepository.java rename to src/main/java/es/princip/getp/domain/project/domain/ProjectApplicationRepository.java index 31f4a6ed..a2d924ac 100644 --- a/src/main/java/es/princip/getp/domain/project/repository/ProjectApplicationRepository.java +++ b/src/main/java/es/princip/getp/domain/project/domain/ProjectApplicationRepository.java @@ -1,6 +1,5 @@ -package es.princip.getp.domain.project.repository; +package es.princip.getp.domain.project.domain; -import es.princip.getp.domain.project.domain.ProjectApplication; import org.springframework.data.jpa.repository.JpaRepository; public interface ProjectApplicationRepository extends JpaRepository { diff --git a/src/main/java/es/princip/getp/domain/project/repository/ProjectLikeRepository.java b/src/main/java/es/princip/getp/domain/project/domain/ProjectLikeRepository.java similarity index 68% rename from src/main/java/es/princip/getp/domain/project/repository/ProjectLikeRepository.java rename to src/main/java/es/princip/getp/domain/project/domain/ProjectLikeRepository.java index cce22772..1c516c9f 100644 --- a/src/main/java/es/princip/getp/domain/project/repository/ProjectLikeRepository.java +++ b/src/main/java/es/princip/getp/domain/project/domain/ProjectLikeRepository.java @@ -1,6 +1,5 @@ -package es.princip.getp.domain.project.repository; +package es.princip.getp.domain.project.domain; -import es.princip.getp.domain.project.domain.ProjectLike; import org.springframework.data.jpa.repository.JpaRepository; public interface ProjectLikeRepository extends JpaRepository { diff --git a/src/main/java/es/princip/getp/domain/project/repository/ProjectRepository.java b/src/main/java/es/princip/getp/domain/project/domain/ProjectRepository.java similarity index 65% rename from src/main/java/es/princip/getp/domain/project/repository/ProjectRepository.java rename to src/main/java/es/princip/getp/domain/project/domain/ProjectRepository.java index 757ae931..7ec49cd8 100644 --- a/src/main/java/es/princip/getp/domain/project/repository/ProjectRepository.java +++ b/src/main/java/es/princip/getp/domain/project/domain/ProjectRepository.java @@ -1,6 +1,6 @@ -package es.princip.getp.domain.project.repository; +package es.princip.getp.domain.project.domain; -import es.princip.getp.domain.project.domain.Project; +import es.princip.getp.domain.project.infra.ProjectQueryDslRepository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; diff --git a/src/main/java/es/princip/getp/domain/project/repository/ProjectQueryDslRepository.java b/src/main/java/es/princip/getp/domain/project/infra/ProjectQueryDslRepository.java similarity index 83% rename from src/main/java/es/princip/getp/domain/project/repository/ProjectQueryDslRepository.java rename to src/main/java/es/princip/getp/domain/project/infra/ProjectQueryDslRepository.java index e1e49109..763e5aa7 100644 --- a/src/main/java/es/princip/getp/domain/project/repository/ProjectQueryDslRepository.java +++ b/src/main/java/es/princip/getp/domain/project/infra/ProjectQueryDslRepository.java @@ -1,4 +1,4 @@ -package es.princip.getp.domain.project.repository; +package es.princip.getp.domain.project.infra; import es.princip.getp.domain.project.domain.Project; import org.springframework.data.domain.Page; diff --git a/src/main/java/es/princip/getp/domain/project/repository/ProjectQueryDslRepositoryImpl.java b/src/main/java/es/princip/getp/domain/project/infra/ProjectQueryDslRepositoryImpl.java similarity index 96% rename from src/main/java/es/princip/getp/domain/project/repository/ProjectQueryDslRepositoryImpl.java rename to src/main/java/es/princip/getp/domain/project/infra/ProjectQueryDslRepositoryImpl.java index 50247e56..e7a47577 100644 --- a/src/main/java/es/princip/getp/domain/project/repository/ProjectQueryDslRepositoryImpl.java +++ b/src/main/java/es/princip/getp/domain/project/infra/ProjectQueryDslRepositoryImpl.java @@ -1,4 +1,4 @@ -package es.princip.getp.domain.project.repository; +package es.princip.getp.domain.project.infra; import com.querydsl.jpa.impl.JPAQuery; import com.querydsl.jpa.impl.JPAQueryFactory; diff --git a/src/test/java/es/princip/getp/domain/auth/application/EmailVerificationServiceTest.java b/src/test/java/es/princip/getp/domain/auth/application/EmailVerificationServiceTest.java index 9319299e..a3c3a3b4 100644 --- a/src/test/java/es/princip/getp/domain/auth/application/EmailVerificationServiceTest.java +++ b/src/test/java/es/princip/getp/domain/auth/application/EmailVerificationServiceTest.java @@ -1,8 +1,8 @@ package es.princip.getp.domain.auth.application; import es.princip.getp.domain.auth.domain.EmailVerification; +import es.princip.getp.domain.auth.domain.EmailVerificationRepository; import es.princip.getp.domain.auth.exception.EmailVerificationErrorCode; -import es.princip.getp.domain.auth.repository.EmailVerificationRepository; import es.princip.getp.infra.exception.BusinessLogicException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; diff --git a/src/test/java/es/princip/getp/domain/client/application/ClientServiceTest.java b/src/test/java/es/princip/getp/domain/client/application/ClientServiceTest.java index 4b174cc3..c6c8582c 100644 --- a/src/test/java/es/princip/getp/domain/client/application/ClientServiceTest.java +++ b/src/test/java/es/princip/getp/domain/client/application/ClientServiceTest.java @@ -1,10 +1,10 @@ package es.princip.getp.domain.client.application; import es.princip.getp.domain.client.domain.Client; +import es.princip.getp.domain.client.domain.ClientRepository; import es.princip.getp.domain.client.dto.request.CreateClientRequest; import es.princip.getp.domain.client.dto.request.UpdateClientRequest; import es.princip.getp.domain.client.fixture.ClientFixture; -import es.princip.getp.domain.client.repository.ClientRepository; import es.princip.getp.domain.member.application.MemberService; import es.princip.getp.domain.member.domain.Member; import es.princip.getp.domain.member.dto.request.UpdateMemberRequest; diff --git a/src/test/java/es/princip/getp/domain/member/application/MemberServiceTest.java b/src/test/java/es/princip/getp/domain/member/application/MemberServiceTest.java index 872bee8f..6ecd58a1 100644 --- a/src/test/java/es/princip/getp/domain/member/application/MemberServiceTest.java +++ b/src/test/java/es/princip/getp/domain/member/application/MemberServiceTest.java @@ -1,11 +1,11 @@ package es.princip.getp.domain.member.application; import es.princip.getp.domain.member.domain.Member; +import es.princip.getp.domain.member.domain.MemberRepository; import es.princip.getp.domain.member.domain.MemberType; import es.princip.getp.domain.member.dto.request.CreateMemberRequest; import es.princip.getp.domain.member.dto.request.UpdateMemberRequest; import es.princip.getp.domain.member.exception.MemberErrorCode; -import es.princip.getp.domain.member.repository.MemberRepository; import es.princip.getp.domain.serviceTerm.application.ServiceTermService; import es.princip.getp.domain.serviceTerm.fixture.ServiceTermFixture; import es.princip.getp.domain.storage.application.ImageStorageService; diff --git a/src/test/java/es/princip/getp/domain/people/application/PeopleLikeServiceTest.java b/src/test/java/es/princip/getp/domain/people/application/PeopleLikeServiceTest.java index af7a8a9e..95e3a735 100644 --- a/src/test/java/es/princip/getp/domain/people/application/PeopleLikeServiceTest.java +++ b/src/test/java/es/princip/getp/domain/people/application/PeopleLikeServiceTest.java @@ -5,9 +5,9 @@ import es.princip.getp.domain.member.domain.Member; import es.princip.getp.domain.people.domain.People; import es.princip.getp.domain.people.domain.PeopleLike; +import es.princip.getp.domain.people.domain.PeopleLikeRepository; import es.princip.getp.domain.people.exception.PeopleErrorCode; import es.princip.getp.domain.people.exception.PeopleLikeErrorCode; -import es.princip.getp.domain.people.repository.PeopleLikeRepository; import es.princip.getp.infra.exception.BusinessLogicException; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; diff --git a/src/test/java/es/princip/getp/domain/people/application/PeopleProfileServiceTest.java b/src/test/java/es/princip/getp/domain/people/application/PeopleProfileServiceTest.java index 854b6074..2313e1c2 100644 --- a/src/test/java/es/princip/getp/domain/people/application/PeopleProfileServiceTest.java +++ b/src/test/java/es/princip/getp/domain/people/application/PeopleProfileServiceTest.java @@ -3,11 +3,11 @@ import es.princip.getp.domain.member.domain.Member; import es.princip.getp.domain.people.domain.People; import es.princip.getp.domain.people.domain.PeopleProfile; +import es.princip.getp.domain.people.domain.PeopleProfileRepository; +import es.princip.getp.domain.people.domain.PeopleRepository; import es.princip.getp.domain.people.dto.request.CreatePeopleProfileRequest; import es.princip.getp.domain.people.dto.request.UpdatePeopleProfileRequest; import es.princip.getp.domain.people.fixture.PeopleProfileFixture; -import es.princip.getp.domain.people.repository.PeopleProfileRepository; -import es.princip.getp.domain.people.repository.PeopleRepository; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; diff --git a/src/test/java/es/princip/getp/domain/people/application/PeopleServiceTest.java b/src/test/java/es/princip/getp/domain/people/application/PeopleServiceTest.java index 1070e986..f18b1dd0 100644 --- a/src/test/java/es/princip/getp/domain/people/application/PeopleServiceTest.java +++ b/src/test/java/es/princip/getp/domain/people/application/PeopleServiceTest.java @@ -4,10 +4,10 @@ import es.princip.getp.domain.member.domain.Member; import es.princip.getp.domain.member.dto.request.UpdateMemberRequest; import es.princip.getp.domain.people.domain.People; +import es.princip.getp.domain.people.domain.PeopleRepository; import es.princip.getp.domain.people.dto.request.CreatePeopleRequest; import es.princip.getp.domain.people.dto.request.UpdatePeopleRequest; import es.princip.getp.domain.people.dto.response.people.CardPeopleResponse; -import es.princip.getp.domain.people.repository.PeopleRepository; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; diff --git a/src/test/java/es/princip/getp/domain/people/repository/PeopleLikeRepositoryTest.java b/src/test/java/es/princip/getp/domain/people/infra/PeopleLikeRepositoryTest.java similarity index 91% rename from src/test/java/es/princip/getp/domain/people/repository/PeopleLikeRepositoryTest.java rename to src/test/java/es/princip/getp/domain/people/infra/PeopleLikeRepositoryTest.java index 5ccba665..b451fca4 100644 --- a/src/test/java/es/princip/getp/domain/people/repository/PeopleLikeRepositoryTest.java +++ b/src/test/java/es/princip/getp/domain/people/infra/PeopleLikeRepositoryTest.java @@ -1,11 +1,13 @@ -package es.princip.getp.domain.people.repository; +package es.princip.getp.domain.people.infra; import es.princip.getp.domain.client.domain.Client; -import es.princip.getp.domain.client.repository.ClientRepository; +import es.princip.getp.domain.client.domain.ClientRepository; import es.princip.getp.domain.member.domain.Member; -import es.princip.getp.domain.member.repository.MemberRepository; +import es.princip.getp.domain.member.domain.MemberRepository; import es.princip.getp.domain.people.domain.People; import es.princip.getp.domain.people.domain.PeopleLike; +import es.princip.getp.domain.people.domain.PeopleLikeRepository; +import es.princip.getp.domain.people.domain.PeopleRepository; import es.princip.getp.infra.config.QueryDslTestConfig; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; diff --git a/src/test/java/es/princip/getp/domain/people/repository/PeopleRepositoryTest.java b/src/test/java/es/princip/getp/domain/people/infra/PeopleRepositoryTest.java similarity index 91% rename from src/test/java/es/princip/getp/domain/people/repository/PeopleRepositoryTest.java rename to src/test/java/es/princip/getp/domain/people/infra/PeopleRepositoryTest.java index 95861dab..d373025d 100644 --- a/src/test/java/es/princip/getp/domain/people/repository/PeopleRepositoryTest.java +++ b/src/test/java/es/princip/getp/domain/people/infra/PeopleRepositoryTest.java @@ -1,6 +1,7 @@ -package es.princip.getp.domain.people.repository; +package es.princip.getp.domain.people.infra; -import es.princip.getp.domain.member.repository.MemberRepository; +import es.princip.getp.domain.member.domain.MemberRepository; +import es.princip.getp.domain.people.domain.PeopleRepository; import es.princip.getp.infra.config.QueryDslTestConfig; import org.junit.jupiter.api.BeforeEach; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/es/princip/getp/domain/project/application/ProjectApplicationServiceTest.java b/src/test/java/es/princip/getp/domain/project/application/ProjectApplicationServiceTest.java index f2ac0626..1e6b8e49 100644 --- a/src/test/java/es/princip/getp/domain/project/application/ProjectApplicationServiceTest.java +++ b/src/test/java/es/princip/getp/domain/project/application/ProjectApplicationServiceTest.java @@ -7,8 +7,8 @@ import es.princip.getp.domain.people.domain.People; import es.princip.getp.domain.project.domain.Project; import es.princip.getp.domain.project.domain.ProjectApplication; +import es.princip.getp.domain.project.domain.ProjectApplicationRepository; import es.princip.getp.domain.project.dto.request.ApplicateProjectRequest; -import es.princip.getp.domain.project.repository.ProjectApplicationRepository; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; diff --git a/src/test/java/es/princip/getp/domain/project/application/ProjectLikeServiceTest.java b/src/test/java/es/princip/getp/domain/project/application/ProjectLikeServiceTest.java index 76fe67c9..52d6643a 100644 --- a/src/test/java/es/princip/getp/domain/project/application/ProjectLikeServiceTest.java +++ b/src/test/java/es/princip/getp/domain/project/application/ProjectLikeServiceTest.java @@ -4,9 +4,9 @@ import es.princip.getp.domain.people.application.PeopleService; import es.princip.getp.domain.people.domain.People; import es.princip.getp.domain.project.domain.Project; +import es.princip.getp.domain.project.domain.ProjectLikeRepository; import es.princip.getp.domain.project.exception.ProjectErrorCode; import es.princip.getp.domain.project.exception.ProjectLikeErrorCode; -import es.princip.getp.domain.project.repository.ProjectLikeRepository; import es.princip.getp.infra.exception.BusinessLogicException; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; diff --git a/src/test/java/es/princip/getp/domain/project/application/ProjectServiceTest.java b/src/test/java/es/princip/getp/domain/project/application/ProjectServiceTest.java index 732e0ca3..efee4ec6 100644 --- a/src/test/java/es/princip/getp/domain/project/application/ProjectServiceTest.java +++ b/src/test/java/es/princip/getp/domain/project/application/ProjectServiceTest.java @@ -6,9 +6,9 @@ import es.princip.getp.domain.member.domain.Member; import es.princip.getp.domain.member.fixture.MemberFixture; import es.princip.getp.domain.project.domain.Project; +import es.princip.getp.domain.project.domain.ProjectRepository; import es.princip.getp.domain.project.dto.request.CreateProjectRequest; import es.princip.getp.domain.project.fixture.ProjectFixture; -import es.princip.getp.domain.project.repository.ProjectRepository; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; diff --git a/src/test/java/es/princip/getp/domain/project/repository/ProjectLikeRepositoryTest.java b/src/test/java/es/princip/getp/domain/project/infra/ProjectLikeRepositoryTest.java similarity index 90% rename from src/test/java/es/princip/getp/domain/project/repository/ProjectLikeRepositoryTest.java rename to src/test/java/es/princip/getp/domain/project/infra/ProjectLikeRepositoryTest.java index 754372c7..799543d6 100644 --- a/src/test/java/es/princip/getp/domain/project/repository/ProjectLikeRepositoryTest.java +++ b/src/test/java/es/princip/getp/domain/project/infra/ProjectLikeRepositoryTest.java @@ -1,13 +1,15 @@ -package es.princip.getp.domain.project.repository; +package es.princip.getp.domain.project.infra; import es.princip.getp.domain.client.domain.Client; -import es.princip.getp.domain.client.repository.ClientRepository; +import es.princip.getp.domain.client.domain.ClientRepository; import es.princip.getp.domain.member.domain.Member; -import es.princip.getp.domain.member.repository.MemberRepository; +import es.princip.getp.domain.member.domain.MemberRepository; import es.princip.getp.domain.people.domain.People; -import es.princip.getp.domain.people.repository.PeopleRepository; +import es.princip.getp.domain.people.domain.PeopleRepository; import es.princip.getp.domain.project.domain.Project; import es.princip.getp.domain.project.domain.ProjectLike; +import es.princip.getp.domain.project.domain.ProjectLikeRepository; +import es.princip.getp.domain.project.domain.ProjectRepository; import es.princip.getp.infra.config.QueryDslTestConfig; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; From 7bd2627eef82ea6d0ee3fcd03d00064fd1bdd08c Mon Sep 17 00:00:00 2001 From: Changyu Shin Date: Thu, 11 Jul 2024 15:28:55 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20repository=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=EC=9D=98=20=EB=A9=B1=EB=93=B1=EC=84=B1=EC=9D=84=20?= =?UTF-8?q?=EC=9C=84=ED=95=9C=20Testcontainers=20=EB=8F=84=EC=9E=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../infra/PeopleLikeRepositoryTest.java | 12 +++------- .../people/infra/PeopleRepositoryTest.java | 13 +++-------- .../infra/ProjectLikeRepositoryTest.java | 11 ++------- .../getp/infra/annotation/RepositoryTest.java | 23 +++++++++++++++++++ src/test/resources/application-test.yml | 2 +- 5 files changed, 32 insertions(+), 29 deletions(-) create mode 100644 src/test/java/es/princip/getp/infra/annotation/RepositoryTest.java diff --git a/src/test/java/es/princip/getp/domain/people/infra/PeopleLikeRepositoryTest.java b/src/test/java/es/princip/getp/domain/people/infra/PeopleLikeRepositoryTest.java index b451fca4..28a7d3e7 100644 --- a/src/test/java/es/princip/getp/domain/people/infra/PeopleLikeRepositoryTest.java +++ b/src/test/java/es/princip/getp/domain/people/infra/PeopleLikeRepositoryTest.java @@ -8,16 +8,12 @@ import es.princip.getp.domain.people.domain.PeopleLike; import es.princip.getp.domain.people.domain.PeopleLikeRepository; import es.princip.getp.domain.people.domain.PeopleRepository; -import es.princip.getp.infra.config.QueryDslTestConfig; +import es.princip.getp.infra.annotation.RepositoryTest; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; -import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; -import org.springframework.context.annotation.Import; -import org.springframework.test.context.ActiveProfiles; import static es.princip.getp.domain.client.fixture.ClientFixture.createClient; import static es.princip.getp.domain.member.domain.MemberType.ROLE_CLIENT; @@ -26,10 +22,8 @@ import static es.princip.getp.domain.people.fixture.PeopleFixture.createPeople; import static org.assertj.core.api.Assertions.assertThat; -@DataJpaTest -@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) -@ActiveProfiles("test") -@Import(QueryDslTestConfig.class) + +@RepositoryTest class PeopleLikeRepositoryTest { @Autowired diff --git a/src/test/java/es/princip/getp/domain/people/infra/PeopleRepositoryTest.java b/src/test/java/es/princip/getp/domain/people/infra/PeopleRepositoryTest.java index d373025d..496a58f4 100644 --- a/src/test/java/es/princip/getp/domain/people/infra/PeopleRepositoryTest.java +++ b/src/test/java/es/princip/getp/domain/people/infra/PeopleRepositoryTest.java @@ -2,18 +2,11 @@ import es.princip.getp.domain.member.domain.MemberRepository; import es.princip.getp.domain.people.domain.PeopleRepository; -import es.princip.getp.infra.config.QueryDslTestConfig; +import es.princip.getp.infra.annotation.RepositoryTest; import org.junit.jupiter.api.BeforeEach; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; -import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; -import org.springframework.context.annotation.Import; -import org.springframework.test.context.ActiveProfiles; - -@DataJpaTest -@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) -@ActiveProfiles("test") -@Import(QueryDslTestConfig.class) + +@RepositoryTest public class PeopleRepositoryTest { @Autowired diff --git a/src/test/java/es/princip/getp/domain/project/infra/ProjectLikeRepositoryTest.java b/src/test/java/es/princip/getp/domain/project/infra/ProjectLikeRepositoryTest.java index 799543d6..6485678c 100644 --- a/src/test/java/es/princip/getp/domain/project/infra/ProjectLikeRepositoryTest.java +++ b/src/test/java/es/princip/getp/domain/project/infra/ProjectLikeRepositoryTest.java @@ -10,16 +10,12 @@ import es.princip.getp.domain.project.domain.ProjectLike; import es.princip.getp.domain.project.domain.ProjectLikeRepository; import es.princip.getp.domain.project.domain.ProjectRepository; -import es.princip.getp.infra.config.QueryDslTestConfig; +import es.princip.getp.infra.annotation.RepositoryTest; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; -import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; -import org.springframework.context.annotation.Import; -import org.springframework.test.context.ActiveProfiles; import static es.princip.getp.domain.client.fixture.ClientFixture.createClient; import static es.princip.getp.domain.member.domain.MemberType.ROLE_CLIENT; @@ -29,10 +25,7 @@ import static es.princip.getp.domain.project.fixture.ProjectFixture.createProject; import static org.assertj.core.api.Assertions.assertThat; -@DataJpaTest -@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) -@ActiveProfiles("test") -@Import(QueryDslTestConfig.class) +@RepositoryTest class ProjectLikeRepositoryTest { @Autowired diff --git a/src/test/java/es/princip/getp/infra/annotation/RepositoryTest.java b/src/test/java/es/princip/getp/infra/annotation/RepositoryTest.java new file mode 100644 index 00000000..d27984a2 --- /dev/null +++ b/src/test/java/es/princip/getp/infra/annotation/RepositoryTest.java @@ -0,0 +1,23 @@ +package es.princip.getp.infra.annotation; + +import es.princip.getp.infra.config.QueryDslTestConfig; +import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; +import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; +import org.springframework.context.annotation.Import; +import org.springframework.test.context.ActiveProfiles; +import org.testcontainers.junit.jupiter.Testcontainers; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@DataJpaTest +@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) +@ActiveProfiles("test") +@Import(QueryDslTestConfig.class) +@Testcontainers +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +public @interface RepositoryTest { +} diff --git a/src/test/resources/application-test.yml b/src/test/resources/application-test.yml index 1727ea2c..cc9720bd 100644 --- a/src/test/resources/application-test.yml +++ b/src/test/resources/application-test.yml @@ -7,7 +7,7 @@ spring: url: ${DB_TEST_URL} username: ${DB_TEST_USERNAME} password: - driver-class-name: org.h2.Driver + driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver jpa: hibernate: