From 5bcb1e1742f55831f0e633a2dbe11d2546fe0614 Mon Sep 17 00:00:00 2001 From: wken5577 Date: Wed, 6 Mar 2024 16:24:10 +0900 Subject: [PATCH] [FEAT] #688 api module add --- build.gradle | 16 ++++++ .../main/java/gg/PingpongApiApplication.java | 2 +- gg-recruit-api/build.gradle | 53 +++++++++++++++++++ .../java/gg/recruit/api/TestController.java | 13 +++++ gg-utils/build.gradle | 2 + settings.gradle | 1 + 6 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 gg-recruit-api/build.gradle create mode 100644 gg-recruit-api/src/main/java/gg/recruit/api/TestController.java diff --git a/build.gradle b/build.gradle index 2f5aefec4..a9cadd9a4 100644 --- a/build.gradle +++ b/build.gradle @@ -56,6 +56,9 @@ subprojects { implementation 'org.springframework.boot:spring-boot-starter-data-redis' implementation 'org.redisson:redisson:3.17.3' + //devtools + implementation 'org.springframework.boot:spring-boot-devtools' + /* spring doc */ implementation 'org.springdoc:springdoc-openapi-ui:1.6.6' @@ -238,6 +241,19 @@ subprojects { project(':gg-pingpong-api') { bootJar { enabled = true } jar { enabled = true } + dependencies { + implementation project(':gg-data') + implementation project(':gg-repo') + implementation project(':gg-admin-repo') + implementation project(':gg-utils') + implementation project(':gg-auth') + implementation project(':gg-recruit-api') + } +} + +project(':gg-pingpong-api') { + bootJar { enabled = false } + jar { enabled = true } dependencies { implementation project(':gg-data') implementation project(':gg-repo') diff --git a/gg-pingpong-api/src/main/java/gg/PingpongApiApplication.java b/gg-pingpong-api/src/main/java/gg/PingpongApiApplication.java index d2cc3673a..b61ffb94e 100644 --- a/gg-pingpong-api/src/main/java/gg/PingpongApiApplication.java +++ b/gg-pingpong-api/src/main/java/gg/PingpongApiApplication.java @@ -4,7 +4,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication(scanBasePackages = {"gg.admin.repo", "gg.data", "gg.repo", - "gg.pingpong.api", "gg.utils", "gg.party.api", "gg.auth"}) + "gg.pingpong.api", "gg.utils", "gg.party.api", "gg.auth", "gg.recruit.api"}) public class PingpongApiApplication { public static void main(String[] args) { diff --git a/gg-recruit-api/build.gradle b/gg-recruit-api/build.gradle new file mode 100644 index 000000000..9edc92c20 --- /dev/null +++ b/gg-recruit-api/build.gradle @@ -0,0 +1,53 @@ +plugins { + id 'java' +} + +group 'gg.api' +version '42gg' + +repositories { + mavenCentral() +} + +dependencies { + /* spring */ + implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springframework.boot:spring-boot-starter-mail' + annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' + + implementation 'org.springframework.session:spring-session-data-redis' + + /* oauth */ + implementation 'org.springframework.boot:spring-boot-starter-security' + implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' + + /* JSON Web Token */ + implementation 'io.jsonwebtoken:jjwt-api:0.11.2' + implementation 'io.jsonwebtoken:jjwt-impl:0.11.2' + implementation 'io.jsonwebtoken:jjwt-jackson:0.11.2' + + /* StringUtils */ + implementation 'org.apache.commons:commons-lang3:3.12.0' + + /* REST template */ + implementation 'org.apache.httpcomponents:httpcore:4.4.15' + implementation 'org.apache.httpcomponents:httpclient:4.5.13' + /* HttpHeaders */ + implementation 'com.google.guava:guava:31.0.1-jre' + + /* S3 Image Bucket */ + implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE' + implementation 'org.springframework:spring-test:5.3.20' + implementation "com.amazonaws:aws-java-sdk-s3:1.12.281" + + testImplementation 'org.springframework.security:spring-security-test' + + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1' + testImplementation testFixtures(project(':gg-utils')) +} + +test { + useJUnitPlatform() +} diff --git a/gg-recruit-api/src/main/java/gg/recruit/api/TestController.java b/gg-recruit-api/src/main/java/gg/recruit/api/TestController.java new file mode 100644 index 000000000..aaf8a81f7 --- /dev/null +++ b/gg-recruit-api/src/main/java/gg/recruit/api/TestController.java @@ -0,0 +1,13 @@ +package gg.recruit.api; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class TestController { + + @GetMapping("/test") + public String test() { + return "test"; + } +} diff --git a/gg-utils/build.gradle b/gg-utils/build.gradle index ee14b69b8..cad5924ec 100644 --- a/gg-utils/build.gradle +++ b/gg-utils/build.gradle @@ -92,12 +92,14 @@ dependencies { testFixturesImplementation project(":gg-repo") testFixturesImplementation project(":gg-admin-repo") testFixturesImplementation project(":gg-pingpong-api") + testFixturesImplementation project(":gg-recruit-api") jacocoAggregation(project(':gg-data')) jacocoAggregation(project(':gg-auth')) jacocoAggregation(project(':gg-repo')) jacocoAggregation(project(':gg-admin-repo')) jacocoAggregation(project(':gg-pingpong-api')) + jacocoAggregation(project(':gg-recruit-api')) } test { diff --git a/settings.gradle b/settings.gradle index 887aef09f..9e311f424 100644 --- a/settings.gradle +++ b/settings.gradle @@ -5,4 +5,5 @@ include 'gg-repo' include 'gg-pingpong-api' include 'gg-utils' include 'gg-auth' +include 'gg-recruit-api'