-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from KUSITMS-29th-TEAM-B/refactor/flight-122
refactor : 도메인 모듈 web 의존성 제거
- Loading branch information
Showing
29 changed files
with
129 additions
and
118 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...rk/config/BookmarkServiceConfiguration.kt → ...rk/config/BookmarkServiceConfiguration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...tlin/com/bamyanggang/apimodule/domain/experience/config/ExperienceServiceConfiguration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.bamyanggang.apimodule.domain.experience.config | ||
|
||
import com.bamyanggang.domainmodule.domain.experience.repository.ExperienceRepository | ||
import com.bamyanggang.domainmodule.domain.experience.service.ExperienceAppender | ||
import com.bamyanggang.domainmodule.domain.experience.service.ExperienceModifier | ||
import com.bamyanggang.domainmodule.domain.experience.service.ExperienceReader | ||
import com.bamyanggang.domainmodule.domain.experience.service.ExperienceRemover | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@Configuration | ||
class ExperienceServiceConfiguration( | ||
private val experienceRepository: ExperienceRepository | ||
) { | ||
|
||
@Bean | ||
fun experienceAppender(): ExperienceAppender { | ||
return ExperienceAppender(experienceRepository) | ||
} | ||
|
||
@Bean | ||
fun experienceModifier(): ExperienceModifier { | ||
return ExperienceModifier(experienceRepository) | ||
} | ||
|
||
@Bean | ||
fun experienceReader(): ExperienceReader { | ||
return ExperienceReader(experienceRepository) | ||
} | ||
|
||
@Bean | ||
fun experienceRemover(): ExperienceRemover { | ||
return ExperienceRemover(experienceRepository) | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...fig/JobDescriptionServiceConfiguration.kt → ...fig/JobDescriptionServiceConfiguration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...in/com/bamyanggang/apimodule/domain/strongpoint/config/StrongPointServiceConfiguration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.bamyanggang.apimodule.domain.strongpoint.config | ||
|
||
import com.bamyanggang.domainmodule.domain.strongpoint.repository.StrongPointRepository | ||
import com.bamyanggang.domainmodule.domain.strongpoint.service.StrongPointAppender | ||
import com.bamyanggang.domainmodule.domain.strongpoint.service.StrongPointReader | ||
import com.bamyanggang.domainmodule.domain.strongpoint.service.StrongPointRemover | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@Configuration | ||
class StrongPointServiceConfiguration( | ||
private val strongPointRepository: StrongPointRepository | ||
) { | ||
|
||
@Bean | ||
fun strongPointAppender(): StrongPointAppender { | ||
return StrongPointAppender(strongPointRepository) | ||
} | ||
|
||
@Bean | ||
fun strongPointReader(): StrongPointReader { | ||
return StrongPointReader(strongPointRepository) | ||
} | ||
|
||
@Bean | ||
fun strongPointModifier(): StrongPointRemover{ | ||
return StrongPointRemover(strongPointRepository) | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
...le/src/main/kotlin/com/bamyanggang/apimodule/domain/tag/config/TagServiceConfiguration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.bamyanggang.apimodule.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) | ||
} | ||
|
||
} |
13 changes: 5 additions & 8 deletions
13
.../main/kotlin/com/bamyanggang/apimodule/domain/user/application/exception/AuthException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,23 @@ | ||
package com.bamyanggang.apimodule.domain.user.application.exception | ||
|
||
import com.bamyanggang.commonmodule.exception.CustomException | ||
import org.springframework.http.HttpStatus | ||
import org.springframework.http.HttpStatusCode | ||
|
||
sealed class AuthException ( | ||
errorCode: Int, | ||
httpStatusCode: HttpStatusCode, | ||
message: String, | ||
) : CustomException(CODE_PREFIX, errorCode, httpStatusCode , message) { | ||
) : CustomException(CODE_PREFIX, errorCode, message) { | ||
|
||
class OAuthFailed(message: String = "OAuth 인증에 실패하였습니다.") : | ||
AuthException(errorCode = 1, httpStatusCode = HttpStatus.BAD_REQUEST, message = message) | ||
AuthException(errorCode = 1, message = message) | ||
|
||
class KakaoUserInfoRetrievalException(message: String = "카카오 사용자 정보를 가져오는데 실패했습니다.") : | ||
AuthException(errorCode = 2, httpStatusCode = HttpStatus.BAD_REQUEST, message = message) | ||
AuthException(errorCode = 2, message = message) | ||
|
||
class GoogleUserInfoRetrievalException(message: String = "구글 사용자 정보를 가져오는데 실패했습니다.") : | ||
AuthException(errorCode = 3, httpStatusCode = HttpStatus.BAD_REQUEST, message = message) | ||
AuthException(errorCode = 3, message = message) | ||
|
||
companion object { | ||
const val CODE_PREFIX = "AUTH" | ||
} | ||
|
||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...n/user/config/UserServiceConfiguration.kt → ...n/user/config/UserServiceConfiguration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
Common-Module/src/main/kotlin/com/bamyanggang/commonmodule/exception/CustomException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,21 @@ | ||
package com.bamyanggang.commonmodule.exception | ||
|
||
import org.springframework.http.HttpStatusCode | ||
|
||
abstract class CustomException( | ||
codePrefix: String = DEFAULT_CODE_PREFIX, | ||
errorCode: Int, | ||
httpStatusCode: HttpStatusCode, | ||
override val message: String = DEFAULT_MESSAGE, | ||
) : RuntimeException(message) { | ||
|
||
val code: String = "$codePrefix-${ | ||
errorCode.toString().padStart(DEFAULT_CODE_NUMBER_LENGTH, DEFAULT_CODE_NUMBER_PAD_CHAR) | ||
}" | ||
|
||
val httpStatusCode: HttpStatusCode = httpStatusCode | ||
|
||
companion object { | ||
const val DEFAULT_CODE_PREFIX = "UNKNOWN" | ||
const val DEFAULT_MESSAGE = "예상하지 못한 오류가 발생했습니다." | ||
const val DEFAULT_CODE_NUMBER_LENGTH = 3 | ||
const val DEFAULT_CODE_NUMBER_PAD_CHAR = '0' | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
dependencies { | ||
implementation(project(":Common-Module")) | ||
//web | ||
implementation("org.springframework.boot:spring-boot-starter-web") | ||
implementation(project(":Support-Module:uuid")) | ||
testImplementation(testFixtures(project(":Common-Module"))) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...c/main/kotlin/com/bamyanggang/domainmodule/domain/experience/service/ExperienceRemover.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 2 additions & 5 deletions
7
...n/com/bamyanggang/domainmodule/domain/jobDescription/exception/JobDescriptionException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 4 additions & 7 deletions
11
...-Module/src/main/kotlin/com/bamyanggang/domainmodule/domain/tag/exception/TagException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.