diff --git a/api/src/main/kotlin/com/few/api/web/controller/hello/_HelloController.kt b/api/src/main/kotlin/com/few/api/web/controller/hello/_HelloController.kt deleted file mode 100644 index df85c2d07..000000000 --- a/api/src/main/kotlin/com/few/api/web/controller/hello/_HelloController.kt +++ /dev/null @@ -1,46 +0,0 @@ -package com.few.api.web.controller.hello - -import com.few.api.web.controller.hello.request._HelloBody -import com.few.api.web.controller.hello.request._HelloParam -import com.few.api.web.support.ApiResponse -import com.few.api.web.support.ApiResponseGenerator -import com.few.api.web.support.MessageCode -import org.springframework.http.HttpStatus -import org.springframework.validation.annotation.Validated -import org.springframework.web.bind.annotation.* - -@Validated -@RestController -@RequestMapping("/api/v1/hello") -class _HelloController { - - /** - * @param param 객체로 파라미터를 받는 경우 - * @param club RequestParam을 사용하는 경우 - */ - @GetMapping - fun helloGet( - param: _HelloParam?, - @RequestParam(required = true) club: String - ): ApiResponse>> { - val name = param?.name ?: "few" - val age = param?.age ?: 0 - val club = club - val data = - mapOf("hello" to "world", "name" to name, "age" to age.toString(), "club" to club) - return ApiResponseGenerator.success(data, HttpStatus.OK) - } - - @PostMapping - fun helloPost( - @RequestBody body: _HelloBody - ): ApiResponse>> { - val data = mapOf("hello" to "world", "name" to body.name) - return ApiResponseGenerator.success(data, HttpStatus.OK, MessageCode.RESOURCE_CREATED) - } - - @GetMapping("/error") - fun helloError(): ApiResponse { - throw RuntimeException("Hello Error") - } -} \ No newline at end of file diff --git a/api/src/main/kotlin/com/few/api/web/controller/hello/request/_HelloBody.kt b/api/src/main/kotlin/com/few/api/web/controller/hello/request/_HelloBody.kt deleted file mode 100644 index b0ece9e5d..000000000 --- a/api/src/main/kotlin/com/few/api/web/controller/hello/request/_HelloBody.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.few.api.web.controller.hello.request - -data class _HelloBody( - val name: String -) \ No newline at end of file diff --git a/api/src/main/kotlin/com/few/api/web/controller/hello/request/_HelloParam.kt b/api/src/main/kotlin/com/few/api/web/controller/hello/request/_HelloParam.kt deleted file mode 100644 index 2dd016669..000000000 --- a/api/src/main/kotlin/com/few/api/web/controller/hello/request/_HelloParam.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.few.api.web.controller.hello.request - -data class _HelloParam( - val name: String?, - val age: Int? -) \ No newline at end of file