Skip to content

Commit

Permalink
refactor: presentation 레이어로 controller 위치 수정
Browse files Browse the repository at this point in the history
이 프로젝트의 controller는 사용자 입력을 처리하는 주로 처리하기 때문에 presentation 레이어로 옮겼습니다
  • Loading branch information
sa46lll committed Dec 24, 2023
1 parent cc1b499 commit 3374399
Show file tree
Hide file tree
Showing 23 changed files with 61 additions and 56 deletions.
1 change: 0 additions & 1 deletion fileshield-application/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
dependencies {
implementation(project(':fileshield-domain'))
implementation(project(':fileshield-presentation'))
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flow.sa46lll.fileshield.application.dto;
package com.flow.sa46lll.fileshield.dto;

import com.flow.sa46lll.fileshield.BlockedExtension;
import com.flow.sa46lll.fileshield.Extension;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flow.sa46lll.fileshield.application.dto;
package com.flow.sa46lll.fileshield.dto;

public record BlockCustomExtensionResponse(
Long extensionId
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flow.sa46lll.fileshield.application.dto;
package com.flow.sa46lll.fileshield.dto;

import com.flow.sa46lll.fileshield.BlockedExtension;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flow.sa46lll.fileshield.application.dto;
package com.flow.sa46lll.fileshield.dto;

import com.flow.sa46lll.fileshield.BlockedExtension;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flow.sa46lll.fileshield.application.dto;
package com.flow.sa46lll.fileshield.dto;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.flow.sa46lll.fileshield.application.mapper;
package com.flow.sa46lll.fileshield.mapper;

import com.flow.sa46lll.fileshield.application.dto.BlockCustomExtensionResponse;
import com.flow.sa46lll.fileshield.dto.BlockCustomExtensionResponse;

public class BlockCustomExtensionResponseMapper {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.flow.sa46lll.fileshield.port.in;

import com.flow.sa46lll.fileshield.dto.BlockCustomExtensionCommand;
import com.flow.sa46lll.fileshield.dto.BlockCustomExtensionResponse;

public interface BlockCustomExtensionUseCase {

BlockCustomExtensionResponse blockCustom(final BlockCustomExtensionCommand blockCustomExtensionCommand);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.flow.sa46lll.fileshield.port.in;

import com.flow.sa46lll.fileshield.dto.GetExtensionsResponse;

public interface GetExtensionQuery {

GetExtensionsResponse findAll();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flow.sa46lll.fileshield.application.port.in;
package com.flow.sa46lll.fileshield.port.in;

public interface UnblockCustomExtensionUseCase {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flow.sa46lll.fileshield.application.port.in;
package com.flow.sa46lll.fileshield.port.in;

public interface UpdateFixedExtensionUsecase {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flow.sa46lll.fileshield.application.port.out;
package com.flow.sa46lll.fileshield.port.out;

import com.flow.sa46lll.fileshield.BlockedExtension;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.flow.sa46lll.fileshield.application.service;
package com.flow.sa46lll.fileshield.service;

import com.flow.sa46lll.fileshield.BlockedExtension;
import com.flow.sa46lll.fileshield.application.dto.GetExtensionResponse;
import com.flow.sa46lll.fileshield.application.dto.GetExtensionsResponse;
import com.flow.sa46lll.fileshield.application.port.in.GetExtensionQuery;
import com.flow.sa46lll.fileshield.application.port.out.ExtensionPersistencePort;
import com.flow.sa46lll.fileshield.dto.GetExtensionResponse;
import com.flow.sa46lll.fileshield.dto.GetExtensionsResponse;
import com.flow.sa46lll.fileshield.port.in.GetExtensionQuery;
import com.flow.sa46lll.fileshield.port.out.ExtensionPersistencePort;
import java.util.List;
import org.springframework.stereotype.Service;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.flow.sa46lll.fileshield.application.service;
package com.flow.sa46lll.fileshield.service;

import com.flow.sa46lll.fileshield.BlockedExtension;
import com.flow.sa46lll.fileshield.application.dto.BlockCustomExtensionCommand;
import com.flow.sa46lll.fileshield.application.dto.BlockCustomExtensionResponse;
import com.flow.sa46lll.fileshield.application.dto.BlockedExtensionMapper;
import com.flow.sa46lll.fileshield.application.mapper.BlockCustomExtensionResponseMapper;
import com.flow.sa46lll.fileshield.application.port.in.BlockCustomExtensionUseCase;
import com.flow.sa46lll.fileshield.application.port.in.UpdateFixedExtensionUsecase;
import com.flow.sa46lll.fileshield.application.port.in.UnblockCustomExtensionUseCase;
import com.flow.sa46lll.fileshield.application.port.out.ExtensionPersistencePort;
import com.flow.sa46lll.fileshield.dto.BlockCustomExtensionCommand;
import com.flow.sa46lll.fileshield.dto.BlockCustomExtensionResponse;
import com.flow.sa46lll.fileshield.dto.BlockedExtensionMapper;
import com.flow.sa46lll.fileshield.mapper.BlockCustomExtensionResponseMapper;
import com.flow.sa46lll.fileshield.port.in.BlockCustomExtensionUseCase;
import com.flow.sa46lll.fileshield.port.in.UpdateFixedExtensionUsecase;
import com.flow.sa46lll.fileshield.port.in.UnblockCustomExtensionUseCase;
import com.flow.sa46lll.fileshield.port.out.ExtensionPersistencePort;
import org.springframework.stereotype.Service;

@Service
Expand Down
1 change: 1 addition & 0 deletions fileshield-bootstrap/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
dependencies {
implementation(project(':fileshield-domain'))
implementation(project(':fileshield-application'))
implementation(project(':fileshield-presentation'))
implementation(project(':fileshield-infrastructure'))
implementation 'org.springframework.boot:spring-boot-starter-web'
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.flow.sa46lll.fileshield.adapter.in.web;

import com.flow.sa46lll.fileshield.application.dto.ApiResponse;
import com.flow.sa46lll.fileshield.dto.ApiResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.flow.sa46lll.fileshield.adapter;

import com.flow.sa46lll.fileshield.BlockedExtension;
import com.flow.sa46lll.fileshield.application.port.out.ExtensionPersistencePort;
import com.flow.sa46lll.fileshield.port.out.ExtensionPersistencePort;
import com.flow.sa46lll.fileshield.entity.BlockedExtensionEntity;
import com.flow.sa46lll.fileshield.entity.ExtensionTypeEntity;
import com.flow.sa46lll.fileshield.mapper.BlockedExtensionMapper;
Expand Down
4 changes: 4 additions & 0 deletions fileshield-presentation/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
dependencies {
implementation(project(':fileshield-domain'))
implementation(project(':fileshield-application'))
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf:3.2.1'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.flow.sa46lll.fileshield.adapter.in.web;
package com.flow.sa46lll.fileshield.api;

import com.flow.sa46lll.fileshield.application.port.in.GetExtensionQuery;
import com.flow.sa46lll.fileshield.dto.GetExtensionsResponse;
import com.flow.sa46lll.fileshield.port.in.GetExtensionQuery;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.flow.sa46lll.fileshield.adapter.in.web;
package com.flow.sa46lll.fileshield.api;

import com.flow.sa46lll.fileshield.application.dto.ApiResponse;
import com.flow.sa46lll.fileshield.application.dto.BlockCustomExtensionCommand;
import com.flow.sa46lll.fileshield.application.dto.BlockCustomExtensionResponse;
import com.flow.sa46lll.fileshield.application.dto.GetExtensionsResponse;
import com.flow.sa46lll.fileshield.application.port.in.BlockCustomExtensionUseCase;
import com.flow.sa46lll.fileshield.application.port.in.GetExtensionQuery;
import com.flow.sa46lll.fileshield.application.port.in.UnblockCustomExtensionUseCase;
import com.flow.sa46lll.fileshield.application.port.in.UpdateFixedExtensionUsecase;
import com.flow.sa46lll.fileshield.dto.ApiResponse;
import com.flow.sa46lll.fileshield.dto.BlockCustomExtensionCommand;
import com.flow.sa46lll.fileshield.dto.BlockCustomExtensionResponse;
import com.flow.sa46lll.fileshield.dto.GetExtensionsResponse;
import com.flow.sa46lll.fileshield.port.in.BlockCustomExtensionUseCase;
import com.flow.sa46lll.fileshield.port.in.GetExtensionQuery;
import com.flow.sa46lll.fileshield.port.in.UnblockCustomExtensionUseCase;
import com.flow.sa46lll.fileshield.port.in.UpdateFixedExtensionUsecase;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PatchMapping;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.flow.sa46lll.fileshield.application.dto;
package com.flow.sa46lll.fileshield.dto;

public record ApiResponse<T>(String code, String message, T data) {

Expand Down

0 comments on commit 3374399

Please sign in to comment.