Skip to content

Commit

Permalink
refactor : Tag 도메인 서비스 빈 등록 방식 수정(#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
isprogrammingfun committed May 21, 2024
1 parent ca22485 commit 5fecd36
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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)
}

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

0 comments on commit 5fecd36

Please sign in to comment.