diff --git a/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/config/TagServiceConfiguration.kt b/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/config/TagServiceConfiguration.kt new file mode 100644 index 00000000..13752fc5 --- /dev/null +++ b/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/config/TagServiceConfiguration.kt @@ -0,0 +1,30 @@ +package com.bamyanggang.domainmodule.domain.tag.config + +import com.bamyanggang.domainmodule.domain.tag.repository.TagRepository +import com.bamyanggang.domainmodule.domain.tag.service.TagAppender +import com.bamyanggang.domainmodule.domain.tag.service.TagReader +import com.bamyanggang.domainmodule.domain.tag.service.TagRemover +import org.springframework.context.annotation.Bean +import org.springframework.context.annotation.Configuration + +@Configuration +class TagServiceConfiguration( + private val tagRepository: TagRepository +) { + + @Bean + fun tagAppender(): TagAppender { + return TagAppender(tagRepository) + } + + @Bean + fun tagReader(): TagReader { + return TagReader(tagRepository) + } + + @Bean + fun tagModifier(): TagRemover { + return TagRemover(tagRepository) + } + +} diff --git a/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/service/TagAppender.kt b/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/service/TagAppender.kt index 83fe8fbb..cb99fc57 100644 --- a/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/service/TagAppender.kt +++ b/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/service/TagAppender.kt @@ -2,10 +2,8 @@ package com.bamyanggang.domainmodule.domain.tag.service import com.bamyanggang.domainmodule.domain.tag.aggregate.Tag import com.bamyanggang.domainmodule.domain.tag.repository.TagRepository -import org.springframework.stereotype.Service import java.util.* -@Service class TagAppender( private val tagRepository: TagRepository ) { diff --git a/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/service/TagReader.kt b/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/service/TagReader.kt index 10383bc9..3846368f 100644 --- a/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/service/TagReader.kt +++ b/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/service/TagReader.kt @@ -2,10 +2,8 @@ package com.bamyanggang.domainmodule.domain.tag.service import com.bamyanggang.domainmodule.domain.tag.aggregate.Tag import com.bamyanggang.domainmodule.domain.tag.repository.TagRepository -import org.springframework.stereotype.Service import java.util.* -@Service class TagReader( private val tagRepository: TagRepository ) { diff --git a/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/service/TagRemover.kt b/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/service/TagRemover.kt index 367b436f..f7c6ed38 100644 --- a/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/service/TagRemover.kt +++ b/Domain-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/service/TagRemover.kt @@ -2,10 +2,8 @@ package com.bamyanggang.domainmodule.domain.tag.service import com.bamyanggang.domainmodule.domain.tag.exception.TagException import com.bamyanggang.domainmodule.domain.tag.repository.TagRepository -import org.springframework.stereotype.Service import java.util.* -@Service class TagRemover( private val tagRepository: TagRepository ) {