Skip to content

Commit

Permalink
test: #13 CI/CD 테스트 커밋
Browse files Browse the repository at this point in the history
  • Loading branch information
kyxxgsoo committed Jul 16, 2024
1 parent 965670e commit 4d747f2
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM amazoncorretto:17-alpine-jdk
ARG JAR_FILE=target/*.jar
ARG PROFILES
ARG ENV
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java", "-Dspring.profiles.active=${PROFILES}", "-Dserver.env=${ENV}", "-jar", "app.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,27 @@

import com.cabin.plat.global.common.BaseResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;

@RestController
@RequiredArgsConstructor
@RequestMapping("/tests")
//@RequestMapping("/tests")
public class TestController {

@Value("${server.env}")
private String env;
@Value("${server.port}")
private String serverPort;
@Value("${server.serverAddress}")
private String serverAddress;
@Value("${serverName}")
private String serverName;

@GetMapping("/base-response")
private BaseResponse<String> baseResponseTestFunc() {
return BaseResponse.onSuccess("Success Response");
Expand All @@ -19,7 +34,24 @@ private BaseResponse<Long> errorHandlerTestFunc(@RequestParam(name = "number") L
}

@GetMapping
private String printTest() {
private String printTest() {
return "TEST";
}

@GetMapping("/health-check")
private BaseResponse<?> healthCheck() {
Map<String, String> responseData = new TreeMap<>();
responseData.put("serverName", serverName);
responseData.put("serverAddress", serverAddress);
responseData.put("serverPort", serverPort);
responseData.put("env", env);
return BaseResponse.onSuccess(responseData);
}

@GetMapping("/env")
private BaseResponse<?> getEnv() {
Map<String, String> responseData = new HashMap<>();

return BaseResponse.onSuccess(env);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.cabin.plat.domain.test.dto.request;

public class TestRequest {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.cabin.plat.domain.test.dto.response;

public class TestResponse {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.cabin.plat.domain.test.mapper;

public class TestMapper {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.cabin.plat.domain.test.repository;

public class TestRepsitory {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.cabin.plat.domain.test.service;

public interface TestService {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.cabin.plat.domain.test.service;

public class TestServiceImpl {
}

0 comments on commit 4d747f2

Please sign in to comment.