diff --git a/build.gradle b/build.gradle index 2f5aefec4..c64de17ee 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-recruit-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-pingpong-api/src/test/java/gg/pingpong/api/admin/coin/controller/CoinPolicyAdminControllerTest.java b/gg-pingpong-api/src/test/java/gg/pingpong/api/admin/coin/controller/CoinPolicyAdminControllerTest.java index affef5991..c9eaa3e2d 100644 --- a/gg-pingpong-api/src/test/java/gg/pingpong/api/admin/coin/controller/CoinPolicyAdminControllerTest.java +++ b/gg-pingpong-api/src/test/java/gg/pingpong/api/admin/coin/controller/CoinPolicyAdminControllerTest.java @@ -18,11 +18,8 @@ import com.fasterxml.jackson.databind.ObjectMapper; import gg.admin.repo.store.CoinPolicyAdminRepository; - -import gg.data.pingpong.store.CoinPolicy; - import gg.auth.utils.AuthTokenProvider; - +import gg.data.pingpong.store.CoinPolicy; import gg.data.user.User; import gg.pingpong.api.admin.store.controller.response.CoinPolicyAdminListResponseDto; import gg.pingpong.api.admin.store.dto.CoinPolicyAdminAddDto; @@ -38,18 +35,14 @@ class CoinPolicyAdminControllerTest { @Autowired TestDataUtils testDataUtils; - - @Autowired - private MockMvc mockMvc; - @Autowired ObjectMapper objectMapper; - @Autowired AuthTokenProvider tokenProvider; - @Autowired CoinPolicyAdminRepository coinPolicyAdminRepository; + @Autowired + private MockMvc mockMvc; @Test @DisplayName("[Get]/pingpong/admin/coinpolicy") diff --git a/gg-recruit-api/build.gradle b/gg-recruit-api/build.gradle new file mode 100644 index 000000000..215acef41 --- /dev/null +++ b/gg-recruit-api/build.gradle @@ -0,0 +1,31 @@ +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' + + /* StringUtils */ + implementation 'org.apache.commons:commons-lang3:3.12.0' + + 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..2764d00f9 --- /dev/null +++ b/gg-recruit-api/src/main/java/gg/recruit/api/TestController.java @@ -0,0 +1,22 @@ +package gg.recruit.api; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import gg.auth.UserDto; +import gg.auth.argumentresolver.Login; + +@RestController +public class TestController { + + @GetMapping("/test") + public String test() { + return "test"; + } + + @GetMapping("/login") + public String login(@Login UserDto user) { + System.out.println("user = " + user); + return "login"; + } +} 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/gg-utils/src/testFixtures/java/gg/utils/TestDataUtils.java b/gg-utils/src/testFixtures/java/gg/utils/TestDataUtils.java index e4a6bf48f..f1ec3b36d 100644 --- a/gg-utils/src/testFixtures/java/gg/utils/TestDataUtils.java +++ b/gg-utils/src/testFixtures/java/gg/utils/TestDataUtils.java @@ -9,6 +9,7 @@ import org.springframework.stereotype.Component; +import gg.auth.utils.AuthTokenProvider; import gg.data.manage.Announcement; import gg.data.noti.Noti; import gg.data.noti.type.NotiType; @@ -37,7 +38,6 @@ import gg.data.user.type.SnsType; import gg.pingpong.api.admin.tournament.controller.request.TournamentAdminCreateRequestDto; import gg.pingpong.api.admin.tournament.controller.request.TournamentAdminUpdateRequestDto; -import gg.auth.utils.AuthTokenProvider; import gg.pingpong.api.user.tournament.controller.response.TournamentResponseDto; import gg.pingpong.api.user.user.dto.UserImageDto; import gg.repo.game.GameRepository; 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'