refs #722: externalize backoffice customer configuration
This commit is contained in:
@@ -1,41 +1,25 @@
|
||||
package com.cloudhandson.vpdbackoffice.web;
|
||||
|
||||
import com.cloudhandson.vpdbackoffice.config.McpProperties;
|
||||
import com.cloudhandson.vpdbackoffice.config.ProductProperties;
|
||||
import com.cloudhandson.vpdbackoffice.config.McpProperties;
|
||||
import com.cloudhandson.vpdbackoffice.service.DataCatalog;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
|
||||
/** Supplies deployment labels to every server-rendered page. */
|
||||
@ControllerAdvice
|
||||
public class ProductModelAdvice {
|
||||
|
||||
private final ProductProperties product;
|
||||
private final DataCatalog catalog;
|
||||
private final McpProperties mcp;
|
||||
|
||||
public ProductModelAdvice(
|
||||
ProductProperties product,
|
||||
DataCatalog catalog,
|
||||
McpProperties mcp
|
||||
) {
|
||||
public ProductModelAdvice(ProductProperties product, DataCatalog catalog, McpProperties mcp) {
|
||||
this.product = product;
|
||||
this.catalog = catalog;
|
||||
this.mcp = mcp;
|
||||
}
|
||||
|
||||
@ModelAttribute("product")
|
||||
ProductProperties product() {
|
||||
return product;
|
||||
}
|
||||
|
||||
ProductProperties product() { return product; }
|
||||
@ModelAttribute("catalogOwner")
|
||||
String catalogOwner() {
|
||||
return catalog.owner();
|
||||
}
|
||||
|
||||
String catalogOwner() { return catalog.owner(); }
|
||||
@ModelAttribute("mcp")
|
||||
McpProperties mcp() {
|
||||
return mcp;
|
||||
}
|
||||
McpProperties mcp() { return mcp; }
|
||||
}
|
||||
|
||||
@@ -115,6 +115,6 @@ public class SchemaMetadataController {
|
||||
private String readMessage(Exception exception) {
|
||||
return exception instanceof AppException
|
||||
? exception.getMessage()
|
||||
: "DB 메타데이터를 조회하지 못했습니다. SGMP_POC 조회 권한과 대상 테이블 상태를 확인하세요.";
|
||||
: "DB 메타데이터를 조회하지 못했습니다. 카탈로그 소유자 조회 권한과 대상 객체 상태를 확인하세요.";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user