-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHealthController.java
More file actions
34 lines (27 loc) · 1.04 KB
/
HealthController.java
File metadata and controls
34 lines (27 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package org.festimate.team.api.common;
import org.festimate.team.global.response.ApiResponse;
import org.festimate.team.global.response.ResponseBuilder;
import org.festimate.team.global.response.ResponseError;
import org.festimate.team.global.exception.FestimateException;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HealthController {
@GetMapping("/health")
public String healthCheck(){
return "healtdfadsfkdjsfakd";
}
@GetMapping("/health/success")
public ResponseEntity<ApiResponse<Void>> getsuccess() {
return ResponseBuilder.ok(null);
}
@GetMapping("/health/created")
public ResponseEntity<ApiResponse<Void>> getCreated() {
return ResponseBuilder.created(null);
}
@GetMapping("/health/fail")
public ResponseEntity<ApiResponse<Void>> getError() {
throw new FestimateException(ResponseError.EXPIRED_ACCESS_TOKEN);
}
}