Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[suffle] Chapter11_무중단 CI/CD (Github Action+AWS Elastic Beanstalk) #45

Open
wants to merge 2 commits into
base: suffle/main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/mission/umc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,5 @@ out/
### VS Code ###
.vscode/

application.yml
application.yml
application-secret.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package com.example.umc.web.controller;

import com.example.umc.common.BaseResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

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

@RestController
@RequestMapping("/health")
public class HealthCheckController {

@Value("${server.env}")
private String env;
@Value("${server.port}")
private String port;
@Value("${server.address}")
private String address;


@GetMapping
public BaseResponse<?> healthCheck(){
Map<String, String> responseData = new TreeMap<>();
responseData.put("env", env);
responseData.put("port", port);
responseData.put("address", address);

return BaseResponse.onSuccess(responseData);
}

@GetMapping("/env")
public BaseResponse<String> getEnv(){

return BaseResponse.onSuccess(env);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public BaseResponse<Page<ReviewResponseDto>> getReview(@PathVariable Long member
return BaseResponse.onSuccess(reviewService.getReviewsByMemberId(memberId, pageable));
}


@GetMapping("/get/missions/{memberId}")
public BaseResponse<Page<MissionResponseDto>> getMissionsByMemberId(@PathVariable Long memberId, Pageable pageable){
return BaseResponse.onSuccess(memberService.getMissionsByMemberId(memberId, pageable));
Expand Down