diff --git a/src/main/java/kr/re/etri/autoflow/entity/WorkflowEntity.java b/src/main/java/kr/re/etri/autoflow/entity/WorkflowEntity.java index 0c6a465..2a798cf 100644 --- a/src/main/java/kr/re/etri/autoflow/entity/WorkflowEntity.java +++ b/src/main/java/kr/re/etri/autoflow/entity/WorkflowEntity.java @@ -18,7 +18,7 @@ public class WorkflowEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Schema(description = "워크플로우 ID22", example = "null", defaultValue = "null") + @Schema(description = "워크플로우 ID", example = "null", defaultValue = "null") @Comment("ID") private Long id; @@ -55,5 +55,6 @@ public class WorkflowEntity { private String kubeflowStatus; @Schema(description = "프로젝트 아이디", example = "1", defaultValue = "0") + @Column(nullable = false) private Long projectId; } diff --git a/src/main/java/kr/re/etri/autoflow/security/jwt/JwtUtils.java b/src/main/java/kr/re/etri/autoflow/security/jwt/JwtUtils.java index 0b86c50..c509c8e 100644 --- a/src/main/java/kr/re/etri/autoflow/security/jwt/JwtUtils.java +++ b/src/main/java/kr/re/etri/autoflow/security/jwt/JwtUtils.java @@ -108,10 +108,21 @@ public class JwtUtils { .build(); } - private String getCookieValueByName(HttpServletRequest request, String name) { - Cookie cookie = WebUtils.getCookie(request, name); - return cookie != null ? cookie.getValue() : null; - } + private String getCookieValueByName(HttpServletRequest request, String name) { + // 1. 쿠키에서 먼저 찾기 + Cookie cookie = WebUtils.getCookie(request, name); + if (cookie != null) { + return cookie.getValue(); + } + + // 2. 없으면 헤더에서 찾기 + String headerValue = request.getHeader(name); + if (headerValue != null && !headerValue.isBlank()) { + return headerValue; + } + + return null; + } // private String getCookieValueByName(HttpServletRequest request, String name) { // Cookie cookie = WebUtils.getCookie(request, name);