[Developer] #424 add editable ORDS settings

Refs #424
This commit is contained in:
devmrko
2026-06-23 11:59:58 +09:00
parent 7d3bc02123
commit 923daa2a56
12 changed files with 201 additions and 10 deletions

View File

@@ -29,5 +29,5 @@ backoffice:
token:
max-days: ${BACKOFFICE_TOKEN_MAX_DAYS:365}
ords:
base-url: ${BACKOFFICE_ORDS_BASE_URL:}
base-url: ${BACKOFFICE_ORDS_BASE_URL:https://yh0olybn5pqce4n-d8aukro81636mon0.adb.ap-seoul-1.oraclecloudapps.com/ords}
timeout-seconds: ${BACKOFFICE_ORDS_TIMEOUT_SECONDS:10}

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cloudhandson.vpdbackoffice.mapper.SettingMapper">
<select id="findByKey" resultType="com.cloudhandson.vpdbackoffice.domain.setting.BackofficeSetting">
SELECT setting_key, setting_value
FROM cb_backoffice_setting
WHERE setting_key = #{settingKey,jdbcType=VARCHAR}
</select>
<update id="upsert">
MERGE INTO cb_backoffice_setting dst
USING (
SELECT #{settingKey,jdbcType=VARCHAR} setting_key,
#{settingValue,jdbcType=VARCHAR} setting_value
FROM dual
) src
ON (dst.setting_key = src.setting_key)
WHEN MATCHED THEN UPDATE SET
dst.setting_value = src.setting_value,
dst.updated_at = SYSTIMESTAMP
WHEN NOT MATCHED THEN INSERT (setting_key, setting_value, updated_at)
VALUES (src.setting_key, src.setting_value, SYSTIMESTAMP)
</update>
</mapper>

View File

@@ -82,6 +82,10 @@ body {
font-weight: 600;
}
.form-grid .span-2 {
grid-column: span 2;
}
.inline-form {
display: inline;
}

View File

@@ -20,6 +20,7 @@
<a class="nav-link" href="/objects">테이블/뷰</a>
<a class="nav-link" href="/tokens">토큰</a>
<a class="nav-link" href="/probe">ORDS 검증</a>
<a class="nav-link" href="/settings">설정</a>
</div>
<form method="post" action="/logout" class="ms-auto">
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">

View File

@@ -0,0 +1,27 @@
<!doctype html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/layout :: head('설정')}"></head>
<body>
<nav th:replace="~{fragments/layout :: nav}"></nav>
<main class="container py-4">
<div class="page-title">
<h1>설정</h1>
<p>백오피스에서 사용하는 외부 연동 값을 관리합니다.</p>
</div>
<div class="alert alert-success" th:if="${message}" th:text="${message}"></div>
<section class="content-band">
<h2>ORDS</h2>
<form method="post" action="/settings/ords" class="form-grid">
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
<label class="span-2">
Base URL
<input class="form-control" name="ordsBaseUrl" th:value="${ordsBaseUrl}" required>
</label>
<button class="btn btn-primary" type="submit">저장</button>
</form>
</section>
</main>
</body>
</html>