Skip to content

Commit

Permalink
πŸ› λ©€ν‹°λͺ¨λ“ˆ Bean μŠ€μΊλ‹ μˆ˜μ •(#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
jun108059 committed Jul 7, 2022
1 parent f402b5e commit ccc0806
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion api/src/main/java/hexagonal/api/ApiApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<RoomJpaEntity, Long> {
Optional<RoomJpaEntity> findByCompanyId(Long companyId);
}

0 comments on commit ccc0806

Please sign in to comment.