Skip to content

Commit a57f588

Browse files
Merge pull request #17 from EntryDSM/feature/9-layered-to-hexagonal
feature/9-layered-to-hexagonal [ USER ]
2 parents 241a704 + c3994f9 commit a57f588

109 files changed

Lines changed: 3235 additions & 55 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build-logic/build.gradle.kts

Lines changed: 0 additions & 11 deletions
This file was deleted.

build-logic/settings.gradle.kts

Lines changed: 0 additions & 17 deletions
This file was deleted.

build-logic/src/main/kotlin/io/casper/build/TestClass.kt

Lines changed: 0 additions & 15 deletions
This file was deleted.

buildSrc/build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
plugins {
2+
`kotlin-dsl`
3+
}
4+
5+
repositories {
6+
mavenCentral()
7+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
object Dependencies {
2+
// Spring Boot
3+
const val SPRING_BOOT_STARTER = "org.springframework.boot:spring-boot-starter"
4+
const val SPRING_BOOT_STARTER_WEB = "org.springframework.boot:spring-boot-starter-web"
5+
const val SPRING_BOOT_STARTER_DATA_JPA = "org.springframework.boot:spring-boot-starter-data-jpa"
6+
const val SPRING_BOOT_STARTER_DATA_REDIS = "org.springframework.boot:spring-boot-starter-data-redis"
7+
const val SPRING_BOOT_STARTER_SECURITY = "org.springframework.boot:spring-boot-starter-security"
8+
const val SPRING_BOOT_STARTER_VALIDATION = "org.springframework.boot:spring-boot-starter-validation"
9+
const val SPRING_BOOT_STARTER_TEST = "org.springframework.boot:spring-boot-starter-test"
10+
11+
// Kotlin
12+
const val KOTLIN_REFLECT = "org.jetbrains.kotlin:kotlin-reflect"
13+
const val KOTLIN_TEST_JUNIT5 = "org.jetbrains.kotlin:kotlin-test-junit5"
14+
15+
// Database
16+
const val MYSQL_CONNECTOR = "com.mysql:mysql-connector-j"
17+
18+
// JSON
19+
const val JACKSON_MODULE_KOTLIN = "com.fasterxml.jackson.module:jackson-module-kotlin"
20+
const val ORG_JSON = "org.json:json:${DependencyVersion.ORG_JSON}"
21+
22+
// JWT
23+
const val JWT_API = "io.jsonwebtoken:jjwt-api:${DependencyVersion.JWT}"
24+
const val JWT_IMPL = "io.jsonwebtoken:jjwt-impl:${DependencyVersion.JWT}"
25+
const val JWT_JACKSON = "io.jsonwebtoken:jjwt-jackson:${DependencyVersion.JWT}"
26+
27+
// MapStruct
28+
const val MAPSTRUCT = "org.mapstruct:mapstruct:${DependencyVersion.MAPSTRUCT}"
29+
const val MAPSTRUCT_PROCESSOR = "org.mapstruct:mapstruct-processor:${DependencyVersion.MAPSTRUCT}"
30+
31+
// Test
32+
const val JUNIT_PLATFORM_LAUNCHER = "org.junit.platform:junit-platform-launcher"
33+
34+
// gRPC
35+
const val GRPC_NETTY_SHADED = "io.grpc:grpc-netty-shaded:${DependencyVersion.GRPC}"
36+
const val GRPC_PROTOBUF = "io.grpc:grpc-protobuf:${DependencyVersion.GRPC}"
37+
const val GRPC_STUB = "io.grpc:grpc-stub:${DependencyVersion.GRPC}"
38+
const val GRPC_KOTLIN_STUB = "io.grpc:grpc-kotlin-stub:${DependencyVersion.GRPC_KOTLIN}"
39+
const val PROTOBUF_KOTLIN = "com.google.protobuf:protobuf-kotlin:${DependencyVersion.PROTOBUF}"
40+
const val GRPC_TESTING = "io.grpc:grpc-testing:${DependencyVersion.GRPC}"
41+
const val GRPC_SERVER_SPRING_BOOT_STARTER = "net.devh:grpc-server-spring-boot-starter:${DependencyVersion.GRPC_SPRING_BOOT_STARTER}"
42+
43+
//OkCert
44+
const val OKCERT_PATH = "src/main/webapp/WEB-INF/lib/OkCert3-java1.5-2.3.1.jar"
45+
46+
//swagger
47+
const val SWAGGER = "org.springdoc:springdoc-openapi-starter-webmvc-ui:${DependencyVersion.SWAGGER}"
48+
49+
// Sentry
50+
const val SENTRY_SPRING_BOOT_STARTER = "io.sentry:sentry-spring-boot-starter-jakarta:${DependencyVersion.SENTRY}"
51+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
object DependencyVersion {
2+
const val KOTLIN = "1.9.25"
3+
const val SPRING_BOOT = "3.4.4"
4+
const val SPRING_DEPENDENCY_MANAGEMENT = "1.1.7"
5+
const val DETEKT = "1.23.6"
6+
const val KTLINT = "12.1.1"
7+
8+
const val JWT = "0.11.5"
9+
const val ORG_JSON = "20230227"
10+
const val MAPSTRUCT = "1.6.0"
11+
12+
const val GRPC = "1.61.1"
13+
const val GRPC_KOTLIN = "1.4.1"
14+
const val PROTOBUF = "3.25.3"
15+
const val GRPC_SPRING_BOOT_STARTER = "3.1.0.RELEASE"
16+
17+
const val SWAGGER = "2.7.0"
18+
19+
const val SENTRY = "7.14.0"
20+
}

buildSrc/src/main/kotlin/Plugin.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
object Plugin {
2+
const val KOTLIN_JVM = "org.jetbrains.kotlin.jvm"
3+
const val KOTLIN_SPRING = "org.jetbrains.kotlin.plugin.spring"
4+
const val KOTLIN_KAPT = "org.jetbrains.kotlin.kapt"
5+
const val SPRING_BOOT = "org.springframework.boot"
6+
const val SPRING_DEPENDENCY_MANAGEMENT = "io.spring.dependency-management"
7+
const val DETEKT = "io.gitlab.arturbosch.detekt"
8+
const val KTLINT = "org.jlleitschuh.gradle.ktlint"
9+
const val CASPER_DOCUMENTATION = "casper.documentation-convention"
10+
const val PROTOBUF = "com.google.protobuf"
11+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
object PluginVersion {
2+
const val KOTLIN_VERSION = "1.9.25"
3+
const val SPRING_BOOT_VERSION = "3.4.4"
4+
const val SPRING_DEPENDENCY_MANAGEMENT_VERSION = "1.1.7"
5+
const val DETEKT_VERSION = "1.23.6"
6+
const val KTLINT_VERSION = "12.1.1"
7+
const val PROTOBUF_VERSION = "0.9.4"
8+
}

casper-user/build.gradle.kts

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
import org.gradle.kotlin.dsl.withType
2+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3+
4+
plugins {
5+
id(Plugin.KOTLIN_JVM) version PluginVersion.KOTLIN_VERSION
6+
id(Plugin.KOTLIN_SPRING) version PluginVersion.KOTLIN_VERSION
7+
id(Plugin.KOTLIN_KAPT)
8+
id(Plugin.SPRING_BOOT) version PluginVersion.SPRING_BOOT_VERSION
9+
id(Plugin.SPRING_DEPENDENCY_MANAGEMENT) version PluginVersion.SPRING_DEPENDENCY_MANAGEMENT_VERSION
10+
id(Plugin.CASPER_DOCUMENTATION)
11+
id(Plugin.PROTOBUF) version PluginVersion.PROTOBUF_VERSION
12+
}
13+
14+
dependencies {
15+
// 스프링 부트 기본 기능
16+
implementation(Dependencies.SPRING_BOOT_STARTER)
17+
18+
// 코틀린 리플렉션
19+
implementation(Dependencies.KOTLIN_REFLECT)
20+
21+
// 스프링 부트 테스트 도구
22+
testImplementation(Dependencies.SPRING_BOOT_STARTER_TEST)
23+
24+
// 코틀린 + JUnit5 테스트
25+
testImplementation(Dependencies.KOTLIN_TEST_JUNIT5)
26+
27+
// JUnit5 실행 런처
28+
testRuntimeOnly(Dependencies.JUNIT_PLATFORM_LAUNCHER)
29+
30+
// 웹 관련
31+
implementation(Dependencies.SPRING_BOOT_STARTER_WEB)
32+
33+
// 데이터베이스
34+
implementation(Dependencies.SPRING_BOOT_STARTER_DATA_JPA)
35+
implementation(Dependencies.SPRING_BOOT_STARTER_DATA_REDIS)
36+
runtimeOnly(Dependencies.MYSQL_CONNECTOR)
37+
38+
// 보안
39+
implementation(Dependencies.SPRING_BOOT_STARTER_SECURITY)
40+
41+
// 검증
42+
implementation(Dependencies.SPRING_BOOT_STARTER_VALIDATION)
43+
44+
// JSON 처리
45+
implementation(Dependencies.JACKSON_MODULE_KOTLIN)
46+
implementation(Dependencies.ORG_JSON)
47+
48+
// JWT
49+
implementation(Dependencies.JWT_API)
50+
implementation(Dependencies.JWT_IMPL)
51+
runtimeOnly(Dependencies.JWT_JACKSON)
52+
53+
implementation(Dependencies.MAPSTRUCT)
54+
kapt(Dependencies.MAPSTRUCT_PROCESSOR)
55+
56+
// grpc
57+
implementation(Dependencies.GRPC_NETTY_SHADED)
58+
implementation(Dependencies.GRPC_PROTOBUF)
59+
implementation(Dependencies.GRPC_STUB)
60+
implementation(Dependencies.GRPC_KOTLIN_STUB)
61+
implementation(Dependencies.PROTOBUF_KOTLIN)
62+
implementation(Dependencies.GRPC_SERVER_SPRING_BOOT_STARTER)
63+
testImplementation(Dependencies.GRPC_TESTING)
64+
65+
// OkCert
66+
implementation(files("$projectDir/${Dependencies.OKCERT_PATH}"))
67+
68+
// swagger
69+
implementation(Dependencies.SWAGGER)
70+
71+
// Sentry
72+
implementation(Dependencies.SENTRY_SPRING_BOOT_STARTER)
73+
}
74+
75+
protobuf {
76+
protoc {
77+
artifact = "com.google.protobuf:protoc:${DependencyVersion.PROTOBUF}"
78+
}
79+
plugins {
80+
create("grpc") {
81+
artifact = "io.grpc:protoc-gen-grpc-java:${DependencyVersion.GRPC}"
82+
}
83+
create("grpckt") {
84+
artifact = "io.grpc:protoc-gen-grpc-kotlin:${DependencyVersion.GRPC_KOTLIN}:jdk8@jar"
85+
}
86+
}
87+
generateProtoTasks {
88+
all().forEach {
89+
it.plugins {
90+
create("grpc")
91+
create("grpckt")
92+
}
93+
}
94+
}
95+
}
96+
97+
repositories {
98+
mavenCentral()
99+
}
100+
101+
kotlin {
102+
jvmToolchain(17)
103+
}
104+
105+
tasks.withType<KotlinCompile> {
106+
kotlinOptions {
107+
freeCompilerArgs += "-Xjsr305=strict"
108+
}
109+
}
110+
111+
tasks.withType<Test> {
112+
useJUnitPlatform()
113+
}

src/main/kotlin/hs/kr/entrydsm/user/CasperUserApplication.kt renamed to casper-user/src/main/kotlin/hs/kr/entrydsm/user/CasperUserApplication.kt

File renamed without changes.

0 commit comments

Comments
 (0)