Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

Commit fb6f1f8

Browse files
authored
[#22]멀티 모듈 설정
[#22]멀티 모듈 설정
2 parents 32a9be8 + 373eb7b commit fb6f1f8

33 files changed

+598
-411
lines changed

.gitignore

Lines changed: 175 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,176 @@
1-
/.idea/
2-
*/.gradle/
3-
*/gradle/
41

2+
# Created by https://www.toptal.com/developers/gitignore/api/kotlin,java,intellij+all,gradle,visualstudiocode
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=kotlin,java,intellij+all,gradle,visualstudiocode
4+
5+
### Intellij+all ###
6+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
7+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
8+
9+
# User-specific stuff
10+
.idea/**/workspace.xml
11+
.idea/**/tasks.xml
12+
.idea/**/usage.statistics.xml
13+
.idea/**/dictionaries
14+
.idea/**/shelf
15+
16+
# AWS User-specific
17+
.idea/**/aws.xml
18+
19+
# Generated files
20+
.idea/**/contentModel.xml
21+
22+
# Sensitive or high-churn files
23+
.idea/**/dataSources/
24+
.idea/**/dataSources.ids
25+
.idea/**/dataSources.local.xml
26+
.idea/**/sqlDataSources.xml
27+
.idea/**/dynamic.xml
28+
.idea/**/uiDesigner.xml
29+
.idea/**/dbnavigator.xml
30+
31+
# Gradle
32+
.idea/**/gradle.xml
33+
.idea/**/libraries
34+
35+
# Gradle and Maven with auto-import
36+
# When using Gradle or Maven with auto-import, you should exclude module files,
37+
# since they will be recreated, and may cause churn. Uncomment if using
38+
# auto-import.
39+
# .idea/artifacts
40+
# .idea/compiler.xml
41+
# .idea/jarRepositories.xml
42+
# .idea/modules.xml
43+
# .idea/*.iml
44+
# .idea/modules
45+
# *.iml
46+
# *.ipr
47+
48+
# CMake
49+
cmake-build-*/
50+
51+
# Mongo Explorer plugin
52+
.idea/**/mongoSettings.xml
53+
54+
# File-based project format
55+
*.iws
56+
57+
# IntelliJ
58+
out/
59+
60+
# mpeltonen/sbt-idea plugin
61+
.idea_modules/
62+
63+
# JIRA plugin
64+
atlassian-ide-plugin.xml
65+
66+
# Cursive Clojure plugin
67+
.idea/replstate.xml
68+
69+
# Crashlytics plugin (for Android Studio and IntelliJ)
70+
com_crashlytics_export_strings.xml
71+
crashlytics.properties
72+
crashlytics-build.properties
73+
fabric.properties
74+
75+
# Editor-based Rest Client
76+
.idea/httpRequests
77+
78+
# Android studio 3.1+ serialized cache file
79+
.idea/caches/build_file_checksums.ser
80+
81+
### Intellij+all Patch ###
82+
# Ignores the whole .idea folder and all .iml files
83+
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
84+
85+
.idea/
86+
87+
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
88+
89+
*.iml
90+
modules.xml
91+
.idea/misc.xml
92+
*.ipr
93+
94+
# Sonarlint plugin
95+
.idea/sonarlint
96+
97+
### Java ###
98+
# Compiled class file
99+
*.class
100+
101+
# Log file
102+
*.log
103+
104+
# BlueJ files
105+
*.ctxt
106+
107+
# Mobile Tools for Java (J2ME)
108+
.mtj.tmp/
109+
110+
# Package Files #
111+
*.jar
112+
*.war
113+
*.nar
114+
*.ear
115+
*.zip
116+
*.tar.gz
117+
*.rar
118+
119+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
120+
hs_err_pid*
121+
122+
### Kotlin ###
123+
# Compiled class file
124+
125+
# Log file
126+
127+
# BlueJ files
128+
129+
# Mobile Tools for Java (J2ME)
130+
131+
# Package Files #
132+
133+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
134+
135+
### VisualStudioCode ###
136+
.vscode/*
137+
!.vscode/settings.json
138+
!.vscode/tasks.json
139+
!.vscode/launch.json
140+
!.vscode/extensions.json
141+
*.code-workspace
142+
143+
# Local History for Visual Studio Code
144+
.history/
145+
146+
### VisualStudioCode Patch ###
147+
# Ignore all local history of files
148+
.history
149+
.ionide
150+
151+
### Gradle ###
152+
.gradle
153+
build/
154+
155+
# Ignore Gradle GUI config
156+
gradle-app.setting
157+
158+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
159+
!gradle-wrapper.jar
160+
161+
# Cache of project
162+
.gradletasknamecache
163+
164+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
165+
# gradle/wrapper/gradle-wrapper.properties
166+
167+
### Gradle Patch ###
168+
**/build/
169+
170+
# Eclipse Gradle plugin generated files
171+
# Eclipse Core
172+
.project
173+
# JDT-specific (Eclipse Java Development Tools)
174+
.classpath
175+
176+
# End of https://www.toptal.com/developers/gitignore/api/kotlin,java,intellij+all,gradle,visualstudiocode

build.gradle.kts

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
3+
plugins {
4+
id("org.springframework.boot") version "2.5.5" apply false
5+
id("io.spring.dependency-management") version "1.0.11.RELEASE" apply false
6+
kotlin("jvm") version "1.5.31"
7+
kotlin("plugin.spring") version "1.5.31"
8+
id("org.jlleitschuh.gradle.ktlint") version "10.2.0"
9+
}
10+
11+
12+
13+
allprojects {
14+
group = "com.sns"
15+
version = "1.0.0"
16+
17+
repositories {
18+
mavenCentral()
19+
}
20+
}
21+
22+
subprojects {
23+
apply(plugin = "kotlin")
24+
apply(plugin = "org.springframework.boot")
25+
apply(plugin = "io.spring.dependency-management")
26+
apply(plugin = "org.jetbrains.kotlin.plugin.spring")
27+
28+
dependencies {
29+
// spring base
30+
implementation("org.springframework.boot:spring-boot-starter-web")
31+
32+
compileOnly("org.projectlombok:lombok")
33+
annotationProcessor("org.projectlombok:lombok")
34+
35+
implementation("org.jetbrains.kotlin:kotlin-reflect")
36+
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
37+
38+
// test
39+
testImplementation("org.springframework.boot:spring-boot-starter-test")
40+
testImplementation("io.mockk:mockk:1.12.0")
41+
testImplementation("com.ninja-squad:springmockk:3.0.1")
42+
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
43+
}
44+
45+
tasks.withType<KotlinCompile> {
46+
kotlinOptions {
47+
freeCompilerArgs = listOf("-Xjsr305=strict")
48+
jvmTarget = "11"
49+
}
50+
}
51+
52+
tasks.withType<Test> {
53+
useJUnitPlatform()
54+
}
55+
}
56+
57+
project(":user-api") {
58+
dependencies {
59+
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
60+
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
61+
implementation("io.springfox:springfox-boot-starter:3.0.0")
62+
implementation("org.springframework.boot:spring-boot-starter-security")
63+
implementation("org.springframework.security:spring-security-test")
64+
runtimeOnly("com.h2database:h2")
65+
runtimeOnly("mysql:mysql-connector-java")
66+
}
67+
}
68+
69+
project(":front") {
70+
dependencies {
71+
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
72+
}
73+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.sns.front
2+
3+
import org.springframework.boot.autoconfigure.SpringBootApplication
4+
import org.springframework.boot.runApplication
5+
6+
/**
7+
* @author Hyounglin Jun
8+
*/
9+
@SpringBootApplication
10+
class FrontApplication
11+
12+
fun main(args: Array<String>) {
13+
runApplication<FrontApplication>(*args)
14+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.sns.front.controller
2+
3+
import org.springframework.stereotype.Controller
4+
import org.springframework.web.bind.annotation.GetMapping
5+
6+
/**
7+
* @author Hyounglin Jun
8+
*/
9+
@Controller
10+
class HomeController {
11+
12+
@GetMapping("/")
13+
fun home(): String {
14+
return "home/home"
15+
}
16+
17+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
server:
2+
port: 10100
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
server:
2+
port: 10100
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Title</title>
6+
<body>Hello world!</body>
7+
</head>
8+
<body>
9+
10+
</body>
11+
</html>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.sns.front;
2+
3+
import org.junit.jupiter.api.Test;
4+
import org.springframework.boot.test.context.SpringBootTest;
5+
6+
@SpringBootTest
7+
class FrontApplicationTests {
8+
9+
@Test
10+
void contextLoads() {
11+
}
12+
13+
}

gradle/wrapper/gradle-wrapper.jar

57.3 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)