diff --git a/api/src/main/java/hexagonal/api/ApiApplication.java b/api/src/main/java/hexagonal/api/ApiApplication.java index a76b18f..8dd55cf 100644 --- a/api/src/main/java/hexagonal/api/ApiApplication.java +++ b/api/src/main/java/hexagonal/api/ApiApplication.java @@ -2,8 +2,12 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.domain.EntityScan; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -@SpringBootApplication +@SpringBootApplication(scanBasePackages = {"hexagonal.core", "hexagonal.api"}) +@EntityScan("hexagonal.core") +@EnableJpaRepositories("hexagonal.core") public class ApiApplication { public static void main(String[] args) { diff --git a/api/src/main/java/hexagonal/api/member/application/service/RegisterMemberService.java b/api/src/main/java/hexagonal/api/member/application/service/RegisterMemberService.java index c17ec02..af6a555 100644 --- a/api/src/main/java/hexagonal/api/member/application/service/RegisterMemberService.java +++ b/api/src/main/java/hexagonal/api/member/application/service/RegisterMemberService.java @@ -6,9 +6,11 @@ import hexagonal.api.member.application.port.out.SaveMemberPort; import hexagonal.core.domain.jpa.MemberJpaEntity; import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; import javax.persistence.EntityNotFoundException; +@Service @RequiredArgsConstructor public class RegisterMemberService implements RegisterMemberUseCase { diff --git a/api/src/main/java/hexagonal/api/member/application/service/UpdateMemberService.java b/api/src/main/java/hexagonal/api/member/application/service/UpdateMemberService.java index 720e065..91ad768 100644 --- a/api/src/main/java/hexagonal/api/member/application/service/UpdateMemberService.java +++ b/api/src/main/java/hexagonal/api/member/application/service/UpdateMemberService.java @@ -6,9 +6,11 @@ import hexagonal.api.member.application.port.out.UpdateMemberPort; import hexagonal.core.domain.jpa.MemberJpaEntity; import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; import javax.persistence.EntityNotFoundException; +@Service @RequiredArgsConstructor public class UpdateMemberService implements UpdateMemberUseCase { diff --git a/api/src/main/java/hexagonal/api/room/application/service/CreateRoomService.java b/api/src/main/java/hexagonal/api/room/application/service/CreateRoomService.java index 525e58f..e246424 100644 --- a/api/src/main/java/hexagonal/api/room/application/service/CreateRoomService.java +++ b/api/src/main/java/hexagonal/api/room/application/service/CreateRoomService.java @@ -6,9 +6,11 @@ import hexagonal.api.room.application.port.out.SaveRoomPort; import hexagonal.core.domain.jpa.RoomJpaEntity; import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; import javax.persistence.EntityNotFoundException; +@Service @RequiredArgsConstructor public class CreateRoomService implements CreateRoomUseCase { diff --git a/core/src/main/java/hexagonal/core/repository/RoomRepository.java b/core/src/main/java/hexagonal/core/repository/RoomRepository.java index c18a18f..537dfd1 100644 --- a/core/src/main/java/hexagonal/core/repository/RoomRepository.java +++ b/core/src/main/java/hexagonal/core/repository/RoomRepository.java @@ -2,11 +2,9 @@ import hexagonal.core.domain.jpa.RoomJpaEntity; import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; import java.util.Optional; -@Repository public interface RoomRepository extends JpaRepository { Optional findByCompanyId(Long companyId); }