mirror of
https://github.com/hwanny1128/HGZero.git
synced 2026-06-13 00:09:10 +00:00
백엔드 실행 프로파일 작성
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -100,6 +100,37 @@ public class ApiResponse<T> {
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 에러 응답 생성 (메시지만)
|
||||
*
|
||||
* @param message 에러 메시지
|
||||
* @return 에러 응답
|
||||
*/
|
||||
public static ApiResponse<Void> error(String message) {
|
||||
return ApiResponse.<Void>builder()
|
||||
.status("error")
|
||||
.code("GENERAL_ERROR")
|
||||
.message(message)
|
||||
.timestamp(LocalDateTime.now())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 타입 안전한 에러 응답 생성 (메시지만)
|
||||
*
|
||||
* @param <T> 응답 데이터 타입
|
||||
* @param message 에러 메시지
|
||||
* @return 에러 응답
|
||||
*/
|
||||
public static <T> ApiResponse<T> errorWithType(String message) {
|
||||
return ApiResponse.<T>builder()
|
||||
.status("error")
|
||||
.code("GENERAL_ERROR")
|
||||
.message(message)
|
||||
.timestamp(LocalDateTime.now())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 에러 응답 생성 (상세 정보 포함)
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user