From 25b106d5a43102330a03027b667b640bb71cb8cb Mon Sep 17 00:00:00 2001 From: songhyeonpk Date: Sun, 23 Mar 2025 14:33:38 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20UseCase,=20Infrastructure=20=EA=B3=84?= =?UTF-8?q?=EC=B8=B5=20=EC=BB=A4=EC=8A=A4=ED=85=80=20=EC=96=B4=EB=85=B8?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradlew | 0 .../ftm/server/common/annotation/InfraService.java | 13 +++++++++++++ .../com/ftm/server/common/annotation/UseCase.java | 13 +++++++++++++ .../server/infrastructure/redis/RedisService.java | 4 ++-- 4 files changed, 28 insertions(+), 2 deletions(-) mode change 100644 => 100755 gradlew create mode 100644 src/main/java/com/ftm/server/common/annotation/InfraService.java create mode 100644 src/main/java/com/ftm/server/common/annotation/UseCase.java diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/src/main/java/com/ftm/server/common/annotation/InfraService.java b/src/main/java/com/ftm/server/common/annotation/InfraService.java new file mode 100644 index 0000000..c00476a --- /dev/null +++ b/src/main/java/com/ftm/server/common/annotation/InfraService.java @@ -0,0 +1,13 @@ +package com.ftm.server.common.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import org.springframework.stereotype.Component; + +/** 인프라스트럭처 계층 구현체 어노테이션 */ +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +@Component +public @interface InfraService {} diff --git a/src/main/java/com/ftm/server/common/annotation/UseCase.java b/src/main/java/com/ftm/server/common/annotation/UseCase.java new file mode 100644 index 0000000..fbf4973 --- /dev/null +++ b/src/main/java/com/ftm/server/common/annotation/UseCase.java @@ -0,0 +1,13 @@ +package com.ftm.server.common.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import org.springframework.stereotype.Component; + +/** UseCase 어노테이션 */ +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +@Component +public @interface UseCase {} diff --git a/src/main/java/com/ftm/server/infrastructure/redis/RedisService.java b/src/main/java/com/ftm/server/infrastructure/redis/RedisService.java index 7d83c96..aa6ea46 100644 --- a/src/main/java/com/ftm/server/infrastructure/redis/RedisService.java +++ b/src/main/java/com/ftm/server/infrastructure/redis/RedisService.java @@ -2,12 +2,12 @@ import com.ftm.server.adapter.gateway.RedisCacheGateway; import com.ftm.server.adapter.gateway.RedisSessionGateway; +import com.ftm.server.common.annotation.InfraService; import lombok.RequiredArgsConstructor; import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.stereotype.Service; /** Redis Caching, Session 구현체 각 역할 별 레디스 조작 관리 (비즈니스 로직이 포함되면 안됨, 기술적인 로직만 수행) */ -@Service +@InfraService @RequiredArgsConstructor public class RedisService implements RedisCacheGateway, RedisSessionGateway {