Skip to content

Commit

Permalink
feat: usecase 예제 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
EunjiShin committed Jul 2, 2024
1 parent 2bf0af9 commit 62d7982
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion application/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies {
implementation(project(":domain"))
implementation(project(":infrastructure:jpa"))
implementation(project(":usecase"))

// spring
implementation("org.springframework.boot:spring-boot-starter")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.depromeet.spot.application.config;

import org.depromeet.spot.jpa.config.JpaConfig;
import org.depromeet.spot.usecase.config.UsecaseConfig;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@ComponentScan(basePackages = {"org.depromeet.spot.application"})
@Configuration
@Import({JpaConfig.class})
@Import({UsecaseConfig.class})
public class SpotApplicationConfig {}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.depromeet.spot.application.member.controller;

import org.depromeet.spot.application.member.controller.request.MemberRequest;
import org.depromeet.spot.application.member.controller.response.MemberResponse;
import org.depromeet.spot.application.member.service.port.MemberService;
import org.depromeet.spot.application.member.dto.request.MemberRequest;
import org.depromeet.spot.application.member.dto.response.MemberResponse;
import org.depromeet.spot.usecase.port.in.MemberService;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package org.depromeet.spot.application.member.dto.request;

public record MemberRequest(String name) {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.depromeet.spot.application.member.controller.response;
package org.depromeet.spot.application.member.dto.response;

import org.depromeet.spot.domain.member.Member;

Expand Down
1 change: 1 addition & 0 deletions infrastructure/jpa/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dependencies {
implementation(project(":domain"))
implementation(project(":usecase"))

// spring
implementation("org.springframework.boot:spring-boot-starter-data-jpa:_")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.depromeet.spot.domain.member.Member;
import org.depromeet.spot.jpa.member.entity.MemberEntity;
import org.depromeet.spot.jpa.member.repository.port.MemberRepository;
import org.depromeet.spot.usecase.port.out.MemberRepository;
import org.springframework.stereotype.Repository;

import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package org.depromeet.spot.usecase.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan(basePackages = {"org.depromeet.spot.usecase"})
public class UsecaseConfig {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.depromeet.spot.application.member.service.port;
package org.depromeet.spot.usecase.port.in;

import org.depromeet.spot.domain.member.Member;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.depromeet.spot.jpa.member.repository.port;
package org.depromeet.spot.usecase.port.out;

import org.depromeet.spot.domain.member.Member;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.depromeet.spot.application.member.service;
package org.depromeet.spot.usecase.usecase;

import org.depromeet.spot.application.member.service.port.MemberService;
import org.depromeet.spot.domain.member.Member;
import org.depromeet.spot.jpa.member.repository.port.MemberRepository;
import org.depromeet.spot.usecase.port.in.MemberService;
import org.depromeet.spot.usecase.port.out.MemberRepository;
import org.springframework.stereotype.Service;

import lombok.RequiredArgsConstructor;
Expand Down

0 comments on commit 62d7982

Please sign in to comment.