diff --git a/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp b/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp
index 8da7778..2c3e6f3 100644
--- a/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp
+++ b/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp
@@ -1608,8 +1608,10 @@
-
-
+ <%-- v1: 기존 API 스펙 (모달). PTL_PROPERTY(Portal / djb.apispec.v1.enabled) 로 노출 제어. --%>
+
+
+
diff --git a/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceController.java b/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceController.java
index 0f21a97..763fe2f 100644
--- a/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceController.java
+++ b/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceController.java
@@ -1,5 +1,6 @@
package com.eactive.eai.rms.onl.transaction.apim;
+import com.eactive.apim.portal.portalproperty.service.PortalPropertyService;
import com.eactive.eai.agent.command.Command;
import com.eactive.eai.agent.command.CommonCommand;
import com.eactive.eai.rms.common.base.OnlBaseAnnotationController;
@@ -24,6 +25,7 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -41,13 +43,19 @@ public class ApiInterfaceController extends OnlBaseAnnotationController {
public static final Log logger = LogFactory.getLog(ApiInterfaceController.class);
+ // v1 "API 스펙"(모달) 버튼 노출 여부. PTL_PROPERTY 그룹 'Portal'. 미설정 시 true(현행 노출 유지)로 생성.
+ private static final String API_SPEC_V1_ENABLED_KEY = "djb.apispec.v1.enabled";
+
private final ApiInterfaceService service;
private final ClientEntityService clientEntityService;
+ private final PortalPropertyService portalPropertyService;
@Autowired
- public ApiInterfaceController(ApiInterfaceService service, ClientEntityService clientEntityService) {
+ public ApiInterfaceController(ApiInterfaceService service, ClientEntityService clientEntityService,
+ PortalPropertyService portalPropertyService) {
this.service = service;
this.clientEntityService = clientEntityService;
+ this.portalPropertyService = portalPropertyService;
}
@GetMapping(value = "/onl/transaction/apim/apiInterfaceMan.view")
@@ -55,10 +63,25 @@ public class ApiInterfaceController extends OnlBaseAnnotationController {
}
@GetMapping(value = "/onl/transaction/apim/apiInterfaceMan.view", params = "cmd=DETAIL")
- public String viewDetail() {
+ public String viewDetail(Model model) {
+ model.addAttribute("apiSpecV1Enabled", resolveApiSpecV1Enabled());
return "/onl/transaction/apim/apiInterfaceManDetail";
}
+ /** v1 API 스펙 버튼 노출 여부 조회(레거시 Y/N 값도 허용). 미설정/파싱불가 시 true. */
+ private boolean resolveApiSpecV1Enabled() {
+ String v = portalPropertyService.getOrCreateProperty("Portal", API_SPEC_V1_ENABLED_KEY, "true",
+ "API 인터페이스 상세의 v1 'API 스펙'(모달) 버튼 노출 여부(true/false)");
+ if (v == null) {
+ return true;
+ }
+ String s = v.trim();
+ if (s.equalsIgnoreCase("false") || s.equalsIgnoreCase("N")) {
+ return false;
+ }
+ return true;
+ }
+
@PostMapping(value= "/onl/transaction/apim/apiInterfaceMan.json", params = "cmd=LIST")
public ResponseEntity> selectList(EAIMessageUISearch eaiMessageUISearch,
@RequestParam(value = "sortName", required = false, defaultValue = "lastModifiedDate") String sortname,