feat(lua-client): 新增 Lua 客户端 SDK 及示例
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# Build stage
|
||||
FROM lua:5.4 AS build
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
# Install build dependencies
|
||||
RUN apk add --no-cache git
|
||||
|
||||
# Copy client library
|
||||
COPY kenaito-conf-lua-client/ ./kenaito-conf-lua-client/
|
||||
|
||||
# Install Lua dependencies
|
||||
WORKDIR /src/kenaito-conf-lua-client
|
||||
RUN luarocks install luasocket && \
|
||||
luarocks install dkjson
|
||||
|
||||
# Copy demo project
|
||||
WORKDIR /src
|
||||
COPY kenaito-conf-lua-client-demo/ ./kenaito-conf-lua-client-demo/
|
||||
|
||||
# Runtime stage
|
||||
FROM lua:5.4
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy Lua modules from build stage
|
||||
COPY --from=build /usr/local/share/lua/5.4 /usr/local/share/lua/5.4
|
||||
COPY --from=build /usr/local/lib/lua/5.4 /usr/local/lib/lua/5.4
|
||||
|
||||
# Copy client library
|
||||
COPY --from=build /src/kenaito-conf-lua-client/kenaito_conf /app/kenaito_conf
|
||||
|
||||
# Copy demo
|
||||
COPY --from=build /src/kenaito-conf-lua-client-demo/app.lua /app/app.lua
|
||||
|
||||
ENV LUA_PATH="/app/?.lua;/usr/local/share/lua/5.4/?.lua;;"
|
||||
ENV LUA_CPATH="/usr/local/lib/lua/5.4/?.so;;"
|
||||
|
||||
ENTRYPOINT ["lua", "app.lua"]
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
- **后端**: Go + Gin + xorm + MySQL
|
||||
- **前端**: Vue 2 + Vite 5 + Element UI 2
|
||||
- **客户端**: Go / Java(Spring Boot 2.x)/ Python / Node.js / Perl / PHP / .NET / C / C++ / Lua / Kotlin / Rust /
|
||||
Ruby
|
||||
- **客户端**: Go / Java(Spring Boot 2.x)/ Python / Node.js / Perl / Lua / PHP / .NET / C / C++ / Kotlin / Rust / Ruby
|
||||
|
||||
## 项目结构
|
||||
|
||||
@@ -33,8 +32,8 @@ kenaito-conf/
|
||||
├── kenaito-conf-c-client-demo/ # (未支持)C 客户端示例
|
||||
├── kenaito-conf-cpp-client/ # (未支持)C++ 客户端 SDK(libcurl + OpenSSL)
|
||||
├── kenaito-conf-cpp-client-demo/ # (未支持)C++ 客户端示例
|
||||
├── kenaito-conf-lua-client/ # (未支持)Lua 客户端 SDK(Lua 5.3+)
|
||||
├── kenaito-conf-lua-client-demo/ # (未支持)Lua 客户端示例
|
||||
├── kenaito-conf-lua-client/ # Lua 客户端 SDK(Lua 5.1+)
|
||||
├── kenaito-conf-lua-client-demo/ # Lua 客户端示例
|
||||
├── kenaito-conf-kotlin-client/ # (未支持)Kotlin 客户端 SDK(Kotlin 1.9+)
|
||||
├── kenaito-conf-kotlin-client-demo/ # (未支持)Kotlin 客户端示例
|
||||
├── kenaito-conf-rust-client/ # (未支持)Rust 客户端 SDK(Rust 1.70+)
|
||||
@@ -321,6 +320,58 @@ $client->sync_once();
|
||||
$client->stop();
|
||||
```
|
||||
|
||||
### Lua 客户端
|
||||
|
||||
适用于 Lua 5.1+ 项目。
|
||||
|
||||
**1. 安装**
|
||||
|
||||
```bash
|
||||
cd kenaito-conf-lua-client
|
||||
luarocks make
|
||||
```
|
||||
|
||||
或手动添加模块路径:
|
||||
|
||||
```lua
|
||||
package.path = package.path .. ";/path/to/kenaito-conf-lua-client/?.lua"
|
||||
```
|
||||
|
||||
**2. 使用**
|
||||
|
||||
```lua
|
||||
local kenaito = require("kenaito_conf")
|
||||
|
||||
local config = kenaito.Config.new({
|
||||
base_url = "http://localhost:8080",
|
||||
app_name = "my-app",
|
||||
env = "daily",
|
||||
sync_interval = 10,
|
||||
})
|
||||
|
||||
local client = kenaito.Client.new({ config = config })
|
||||
|
||||
-- 监听配置变更
|
||||
client:on_change(function(changed)
|
||||
for k, v in pairs(changed) do
|
||||
print("config changed: " .. k .. " = " .. v)
|
||||
end
|
||||
end)
|
||||
|
||||
-- 启动客户端(拉取配置)
|
||||
client:start()
|
||||
|
||||
-- 获取配置
|
||||
local value = client:get("database.host")
|
||||
local all = client:get_all()
|
||||
|
||||
-- 手动同步一次
|
||||
client:sync_once()
|
||||
|
||||
-- 停止
|
||||
client:stop()
|
||||
```
|
||||
|
||||
## API 概览
|
||||
|
||||
### 管理端 API(需 JWT 认证)
|
||||
|
||||
@@ -86,6 +86,18 @@ docker run -it --rm \
|
||||
kenaito-conf-perl-demo
|
||||
```
|
||||
|
||||
## Lua 客户端
|
||||
|
||||
```bash
|
||||
docker build -f Dockerfile.lua -t kenaito-conf-lua-demo .
|
||||
|
||||
docker run -it --rm \
|
||||
-e KENAITO_BASE_URL=http://host.docker.internal:8080 \
|
||||
-e KENAITO_APP_NAME=kenaito-springboot-demo \
|
||||
-e KENAITO_ENV=daily \
|
||||
kenaito-conf-lua-demo
|
||||
```
|
||||
|
||||
## Spring Boot 2 客户端(测试通过)
|
||||
|
||||
```bash
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
#!/usr/bin/env lua
|
||||
|
||||
-- 添加客户端库路径
|
||||
local script_dir = debug.getinfo(1, "S").source:match("@(.+)/[^/]+$") or "."
|
||||
package.path = package.path .. ";" .. script_dir .. "/../kenaito-conf-lua-client/?.lua"
|
||||
|
||||
local kenaito = require("kenaito_conf")
|
||||
|
||||
-- 读取环境变量
|
||||
local function get_env(key, default)
|
||||
local value = os.getenv(key)
|
||||
if value and value ~= "" then
|
||||
return value
|
||||
end
|
||||
return default
|
||||
end
|
||||
|
||||
-- 配置值(可被远程配置覆盖)
|
||||
local config_values = {
|
||||
["database.host"] = get_env("DATABASE_HOST", "192.168.1.1"),
|
||||
["database.port"] = get_env("DATABASE_PORT", "8888"),
|
||||
["database.name"] = get_env("DATABASE_NAME", "xxxx"),
|
||||
["database.user"] = get_env("DATABASE_USER", "xxxx"),
|
||||
["database.password"] = get_env("DATABASE_PASSWORD", "xxxxxxxx"),
|
||||
}
|
||||
|
||||
-- 创建配置
|
||||
local config = kenaito.Config.new({
|
||||
base_url = get_env("KENAITO_BASE_URL", "http://localhost:8080"),
|
||||
app_name = get_env("KENAITO_APP_NAME", "kenaito-springboot-demo"),
|
||||
env = get_env("KENAITO_ENV", "daily"),
|
||||
version = get_env("KENAITO_VERSION", "latest"),
|
||||
token = get_env("KENAITO_TOKEN", ""),
|
||||
sync_interval = tonumber(get_env("KENAITO_SYNC_INTERVAL", "10")),
|
||||
cache_dir = get_env("KENAITO_CACHE_DIR", "."),
|
||||
})
|
||||
|
||||
-- 创建客户端
|
||||
local client = kenaito.Client.new({ config = config })
|
||||
|
||||
-- 监听配置变更
|
||||
client:on_change(function(changed)
|
||||
print("Config changed:")
|
||||
for k, v in pairs(changed) do
|
||||
print(" " .. k .. " = " .. v)
|
||||
if config_values[k] then
|
||||
config_values[k] = v
|
||||
print(" [updated] " .. k .. " = " .. v)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
-- 启动客户端
|
||||
local ok, err = pcall(function()
|
||||
client:start()
|
||||
end)
|
||||
|
||||
if not ok then
|
||||
print("Failed to init config client, using local defaults: " .. tostring(err))
|
||||
end
|
||||
|
||||
-- 应用远程配置
|
||||
local remote = client:get_all()
|
||||
local count = 0
|
||||
for _ in pairs(remote) do
|
||||
count = count + 1
|
||||
end
|
||||
|
||||
for k, v in pairs(remote) do
|
||||
if config_values[k] then
|
||||
config_values[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
print("loaded " .. count .. " configs from remote")
|
||||
print()
|
||||
|
||||
-- 显示当前配置
|
||||
print("Current configs:")
|
||||
local keys = {}
|
||||
for k in pairs(config_values) do
|
||||
table.insert(keys, k)
|
||||
end
|
||||
table.sort(keys)
|
||||
for _, k in ipairs(keys) do
|
||||
print(" " .. k .. " = " .. config_values[k])
|
||||
end
|
||||
|
||||
print()
|
||||
print("Listening for config changes... (press Ctrl+C to stop)")
|
||||
|
||||
-- 同步循环
|
||||
local running = true
|
||||
|
||||
-- 注册信号处理(如果支持)
|
||||
if package.loaded["posix.signal"] then
|
||||
local signal = require("posix.signal")
|
||||
signal.signal(signal.SIGINT, function()
|
||||
print("\nShutting down...")
|
||||
running = false
|
||||
client:stop()
|
||||
end)
|
||||
end
|
||||
|
||||
-- 主循环
|
||||
while running do
|
||||
client:sync_once()
|
||||
|
||||
-- 等待 sync_interval 秒,期间检查是否应该停止
|
||||
for i = 1, config.sync_interval * 10 do
|
||||
if not running then
|
||||
break
|
||||
end
|
||||
-- 休眠 0.1 秒
|
||||
local start = os.clock()
|
||||
while os.clock() - start < 0.1 do
|
||||
-- busy wait
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,95 @@
|
||||
# Kenaito Config Center Lua Client
|
||||
|
||||
Lua 客户端 SDK,适用于 Lua 5.1+ 项目。
|
||||
|
||||
## 安装
|
||||
|
||||
### 使用 LuaRocks(推荐)
|
||||
|
||||
```bash
|
||||
cd kenaito-conf-lua-client
|
||||
luarocks make
|
||||
```
|
||||
|
||||
### 手动安装
|
||||
|
||||
将 `kenaito_conf` 目录复制到你的 Lua 路径中,或添加到 `package.path`:
|
||||
|
||||
```lua
|
||||
package.path = package.path .. ";/path/to/kenaito-conf-lua-client/?.lua"
|
||||
```
|
||||
|
||||
## 依赖
|
||||
|
||||
- Lua 5.1+
|
||||
- LuaSocket (`luasocket`)
|
||||
- dkjson (`dkjson`)
|
||||
|
||||
## 使用
|
||||
|
||||
```lua
|
||||
local kenaito = require("kenaito_conf")
|
||||
|
||||
local config = kenaito.Config.new({
|
||||
base_url = "http://localhost:8080",
|
||||
app_name = "my-app",
|
||||
env = "daily",
|
||||
sync_interval = 10
|
||||
})
|
||||
|
||||
local client = kenaito.Client.new({ config = config })
|
||||
|
||||
-- 监听配置变更
|
||||
client:on_change(function(changed)
|
||||
for k, v in pairs(changed) do
|
||||
print("config changed: " .. k .. " = " .. v)
|
||||
end
|
||||
end)
|
||||
|
||||
-- 启动客户端(拉取配置)
|
||||
client:start()
|
||||
|
||||
-- 获取配置
|
||||
local value = client:get("database.host")
|
||||
local all = client:get_all()
|
||||
|
||||
-- 手动同步一次
|
||||
client:sync_once()
|
||||
|
||||
-- 停止
|
||||
client:stop()
|
||||
```
|
||||
|
||||
## 配置项
|
||||
|
||||
| 参数 | 说明 | 默认值 |
|
||||
|------|------|--------|
|
||||
| `base_url` | 配置中心地址 | `http://localhost:8080` |
|
||||
| `app_name` | 应用名称 | (必填) |
|
||||
| `env` | 环境标识 | `dev` |
|
||||
| `version` | 配置版本 | `latest` |
|
||||
| `token` | 应用 Token | 空 |
|
||||
| `sync_interval` | 同步间隔(秒) | `10` |
|
||||
| `ignore_global` | 忽略全局配置 | `false` |
|
||||
| `cache_dir` | 缓存目录 | `.` |
|
||||
|
||||
## Demo
|
||||
|
||||
```bash
|
||||
cd kenaito-conf-lua-client-demo
|
||||
lua app.lua
|
||||
```
|
||||
|
||||
## 环境变量
|
||||
|
||||
Demo 支持以下环境变量:
|
||||
|
||||
| 变量名 | 说明 | 默认值 |
|
||||
|--------|------|--------|
|
||||
| `KENAITO_BASE_URL` | 配置中心地址 | `http://localhost:8080` |
|
||||
| `KENAITO_APP_NAME` | 应用名称 | `kenaito-springboot-demo` |
|
||||
| `KENAITO_ENV` | 环境标识 | `daily` |
|
||||
| `KENAITO_VERSION` | 配置版本 | `latest` |
|
||||
| `KENAITO_TOKEN` | 应用 Token | 空 |
|
||||
| `KENAITO_SYNC_INTERVAL` | 同步间隔(秒) | `10` |
|
||||
| `KENAITO_CACHE_DIR` | 缓存目录 | `.` |
|
||||
@@ -0,0 +1,41 @@
|
||||
local json = require("dkjson")
|
||||
|
||||
local Cache = {}
|
||||
Cache.__index = Cache
|
||||
|
||||
local CACHE_FILE = "config-cache.json"
|
||||
|
||||
function Cache.new(cache_dir)
|
||||
local self = setmetatable({}, Cache)
|
||||
self.cache_dir = cache_dir or "."
|
||||
return self
|
||||
end
|
||||
|
||||
function Cache:write(data)
|
||||
local path = self.cache_dir .. "/" .. CACHE_FILE
|
||||
local file = io.open(path, "w")
|
||||
if not file then
|
||||
return false, "cannot open cache file: " .. path
|
||||
end
|
||||
local str = json.encode(data, { indent = true })
|
||||
file:write(str)
|
||||
file:close()
|
||||
return true
|
||||
end
|
||||
|
||||
function Cache:read()
|
||||
local path = self.cache_dir .. "/" .. CACHE_FILE
|
||||
local file = io.open(path, "r")
|
||||
if not file then
|
||||
return nil, "cache file not found"
|
||||
end
|
||||
local str = file:read("*a")
|
||||
file:close()
|
||||
local data, _, err = json.decode(str)
|
||||
if err then
|
||||
return nil, "json decode error: " .. err
|
||||
end
|
||||
return data
|
||||
end
|
||||
|
||||
return Cache
|
||||
@@ -0,0 +1,219 @@
|
||||
local http = require("socket.http")
|
||||
local ltn12 = require("ltn12")
|
||||
local json = require("dkjson")
|
||||
|
||||
local Config = require("kenaito_conf.config")
|
||||
local Cache = require("kenaito_conf.cache")
|
||||
local Listener = require("kenaito_conf.listener")
|
||||
|
||||
local Client = {}
|
||||
Client.__index = Client
|
||||
|
||||
function Client.new(opts)
|
||||
local config = opts.config
|
||||
if not config then
|
||||
error("config is required")
|
||||
end
|
||||
|
||||
local self = setmetatable({}, Client)
|
||||
self.config = config
|
||||
self.cache = Cache.new(config.cache_dir)
|
||||
self.listener = Listener.new()
|
||||
self.configs = {}
|
||||
self.last_time = 0
|
||||
self.started = false
|
||||
self.stop = false
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function Client:on_change(handler)
|
||||
self.listener:on_change(handler)
|
||||
end
|
||||
|
||||
function Client:get(key)
|
||||
return self.configs[key]
|
||||
end
|
||||
|
||||
function Client:get_all()
|
||||
local result = {}
|
||||
for k, v in pairs(self.configs) do
|
||||
result[k] = v
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
function Client:start()
|
||||
if self.started then
|
||||
return
|
||||
end
|
||||
self.started = true
|
||||
|
||||
local ok, err = self:_fetch_all()
|
||||
if not ok then
|
||||
print("[ConfigClient] fetch all configs error: " .. tostring(err) .. ", trying cache")
|
||||
local cached, cache_err = self.cache:read()
|
||||
if cached then
|
||||
self:_apply_configs(cached)
|
||||
local count = 0
|
||||
for _ in pairs(self.configs) do
|
||||
count = count + 1
|
||||
end
|
||||
print("[ConfigClient] loaded " .. count .. " configs from cache")
|
||||
else
|
||||
error("fetch configs failed and no cache: " .. tostring(err))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Client:stop()
|
||||
self.stop = true
|
||||
end
|
||||
|
||||
function Client:sync_once()
|
||||
local ok, err = self:_fetch_changed()
|
||||
if not ok then
|
||||
print("[ConfigClient] sync error: " .. tostring(err))
|
||||
end
|
||||
end
|
||||
|
||||
function Client:_http_post(url, payload)
|
||||
local request_body = json.encode(payload)
|
||||
local response_body = {}
|
||||
|
||||
local res, code, response_headers = http.request{
|
||||
url = url,
|
||||
method = "POST",
|
||||
headers = {
|
||||
["Content-Type"] = "application/json",
|
||||
["Content-Length"] = #request_body
|
||||
},
|
||||
source = ltn12.source.string(request_body),
|
||||
sink = ltn12.sink.table(response_body)
|
||||
}
|
||||
|
||||
if res == nil then
|
||||
return nil, "HTTP request failed: " .. tostring(code)
|
||||
end
|
||||
|
||||
if code ~= 200 then
|
||||
return nil, "HTTP " .. code
|
||||
end
|
||||
|
||||
local response_str = table.concat(response_body)
|
||||
local data, _, err = json.decode(response_str)
|
||||
if err then
|
||||
return nil, "JSON decode error: " .. err
|
||||
end
|
||||
|
||||
return data
|
||||
end
|
||||
|
||||
function Client:_fetch_all()
|
||||
local url = self.config.base_url .. "/api/fetchAllConfigs"
|
||||
local payload = {
|
||||
appName = self.config.app_name,
|
||||
env = self.config.env,
|
||||
version = self.config.version,
|
||||
ignoreGlobal = self.config.ignore_global,
|
||||
token = self.config.token
|
||||
}
|
||||
|
||||
local data, err = self:_http_post(url, payload)
|
||||
if not data then
|
||||
return false, err
|
||||
end
|
||||
|
||||
if data.code and data.code ~= 0 then
|
||||
return false, "server error: " .. (data.msg or "unknown")
|
||||
end
|
||||
|
||||
if data["latest.fetch.timestamp"] then
|
||||
self.last_time = tonumber(data["latest.fetch.timestamp"])
|
||||
end
|
||||
|
||||
self.cache:write(data)
|
||||
self:_apply_configs(data)
|
||||
|
||||
local count = 0
|
||||
for _ in pairs(self.configs) do
|
||||
count = count + 1
|
||||
end
|
||||
print("[ConfigClient] fetched " .. count .. " configs")
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function Client:_fetch_changed()
|
||||
local url = self.config.base_url .. "/api/fetchChangedConfigs"
|
||||
local payload = {
|
||||
appName = self.config.app_name,
|
||||
env = self.config.env,
|
||||
version = self.config.version,
|
||||
lastTime = self.last_time,
|
||||
ignoreGlobal = self.config.ignore_global,
|
||||
token = self.config.token
|
||||
}
|
||||
|
||||
local result, err = self:_http_post(url, payload)
|
||||
if not result then
|
||||
return false, err
|
||||
end
|
||||
|
||||
if result.code and result.code ~= 0 then
|
||||
return false, "server error code: " .. result.code
|
||||
end
|
||||
|
||||
local changed_data = result.data or {}
|
||||
|
||||
if changed_data["latest.fetch.timestamp"] then
|
||||
self.last_time = tonumber(changed_data["latest.fetch.timestamp"])
|
||||
changed_data["latest.fetch.timestamp"] = nil
|
||||
end
|
||||
|
||||
-- 处理删除的配置
|
||||
if changed_data.deletedKeys and changed_data.deletedKeys ~= "" then
|
||||
local deleted_keys = {}
|
||||
for key in string.gmatch(changed_data.deletedKeys, "([^,]+)") do
|
||||
table.insert(deleted_keys, key)
|
||||
self.configs[key] = nil
|
||||
end
|
||||
print("[ConfigClient] " .. #deleted_keys .. " configs deleted: " .. table.concat(deleted_keys, ", "))
|
||||
changed_data.deletedKeys = nil
|
||||
end
|
||||
|
||||
-- 处理变更的配置
|
||||
local has_changes = false
|
||||
local changed_keys = {}
|
||||
for k, v in pairs(changed_data) do
|
||||
if type(v) == "string" then
|
||||
self.configs[k] = v
|
||||
table.insert(changed_keys, k)
|
||||
has_changes = true
|
||||
end
|
||||
end
|
||||
|
||||
if has_changes then
|
||||
local changed = {}
|
||||
for _, k in ipairs(changed_keys) do
|
||||
changed[k] = self.configs[k]
|
||||
end
|
||||
self.listener:notify(changed)
|
||||
print("[ConfigClient] " .. #changed_keys .. " configs changed: " .. table.concat(changed_keys, ", "))
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function Client:_apply_configs(data)
|
||||
for k, v in pairs(data) do
|
||||
-- 跳过元数据
|
||||
if k:sub(1, 8) == "kenaito." or k == "latest.fetch.timestamp" then
|
||||
-- skip
|
||||
elseif type(v) == "string" then
|
||||
self.configs[k] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return Client
|
||||
@@ -0,0 +1,18 @@
|
||||
local Config = {}
|
||||
Config.__index = Config
|
||||
|
||||
function Config.new(opts)
|
||||
opts = opts or {}
|
||||
local self = setmetatable({}, Config)
|
||||
self.base_url = opts.base_url or "http://localhost:8080"
|
||||
self.app_name = opts.app_name or ""
|
||||
self.env = opts.env or "dev"
|
||||
self.version = opts.version or "latest"
|
||||
self.token = opts.token or ""
|
||||
self.sync_interval = opts.sync_interval or 10
|
||||
self.ignore_global = opts.ignore_global or false
|
||||
self.cache_dir = opts.cache_dir or "."
|
||||
return self
|
||||
end
|
||||
|
||||
return Config
|
||||
@@ -0,0 +1,8 @@
|
||||
local Client = require("kenaito_conf.client")
|
||||
local Config = require("kenaito_conf.config")
|
||||
|
||||
return {
|
||||
Client = Client,
|
||||
Config = Config,
|
||||
_VERSION = "1.0.3"
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
local Listener = {}
|
||||
Listener.__index = Listener
|
||||
|
||||
function Listener.new()
|
||||
local self = setmetatable({}, Listener)
|
||||
self.handlers = {}
|
||||
return self
|
||||
end
|
||||
|
||||
function Listener:on_change(handler)
|
||||
table.insert(self.handlers, handler)
|
||||
end
|
||||
|
||||
function Listener:notify(changed)
|
||||
for _, handler in ipairs(self.handlers) do
|
||||
local ok, err = pcall(handler, changed)
|
||||
if not ok then
|
||||
print("[ConfigClient] change handler error: " .. tostring(err))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return Listener
|
||||
@@ -0,0 +1,760 @@
|
||||
-- Database export: kenaito_conf
|
||||
-- Date: 2026-10-18 09:33:20
|
||||
-- Generated by DBX
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
CREATE TABLE `user_permission` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`user_id` int DEFAULT NULL,
|
||||
`env` varchar(16) DEFAULT NULL,
|
||||
`app_id` int DEFAULT NULL,
|
||||
`operate` varchar(8) DEFAULT 'RW',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
||||
|
||||
CREATE TABLE `profile_extr_attr` (
|
||||
`profile` varchar(32) NOT NULL,
|
||||
`attr_name` varchar(50) NOT NULL,
|
||||
`attr_value` varchar(100) DEFAULT NULL,
|
||||
PRIMARY KEY (`profile`,`attr_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
||||
|
||||
CREATE TABLE `business_group` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(32) NOT NULL,
|
||||
`master` varchar(255) DEFAULT NULL,
|
||||
`remarks` text,
|
||||
`enabled` tinyint(1) DEFAULT '1',
|
||||
`created_at` datetime DEFAULT NULL,
|
||||
`created_by` varchar(32) DEFAULT NULL,
|
||||
`updated_at` datetime DEFAULT NULL,
|
||||
`updated_by` varchar(32) DEFAULT NULL,
|
||||
`master_uids` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;
|
||||
|
||||
INSERT INTO `business_group` (`id`, `name`, `master`, `remarks`, `enabled`, `created_at`, `created_by`, `updated_at`, `updated_by`, `master_uids`) VALUES
|
||||
(1, '默认组', 'admin,guest', '', 1, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin', '1,5');
|
||||
|
||||
CREATE TABLE `client_instance` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`app_config_id` int DEFAULT NULL,
|
||||
`app_name` varchar(64) DEFAULT NULL,
|
||||
`env` varchar(32) DEFAULT NULL,
|
||||
`ip` varchar(64) DEFAULT NULL,
|
||||
`last_fetch_at` datetime DEFAULT NULL,
|
||||
`last_fetch_type` varchar(16) DEFAULT NULL,
|
||||
`created_at` datetime DEFAULT NULL,
|
||||
`updated_at` datetime DEFAULT NULL,
|
||||
`last_ping_at` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `UQE_client_instance_udx_aaei` (`app_config_id`,`app_name`,`env`,`ip`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb3;
|
||||
|
||||
CREATE TABLE `application` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`group_id` int DEFAULT NULL,
|
||||
`name` varchar(32) DEFAULT NULL,
|
||||
`code` varchar(32) DEFAULT NULL,
|
||||
`service_id` varchar(64) DEFAULT NULL,
|
||||
`remarks` text,
|
||||
`enabled` tinyint(1) DEFAULT '1',
|
||||
`created_at` datetime DEFAULT NULL,
|
||||
`created_by` varchar(32) DEFAULT NULL,
|
||||
`updated_at` datetime DEFAULT NULL,
|
||||
`updated_by` varchar(32) DEFAULT NULL,
|
||||
`token` varchar(64) DEFAULT NULL,
|
||||
`owner_ids` varchar(255) DEFAULT NULL,
|
||||
`owner_names` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;
|
||||
|
||||
INSERT INTO `application` (`id`, `group_id`, `name`, `code`, `service_id`, `remarks`, `enabled`, `created_at`, `created_by`, `updated_at`, `updated_by`, `token`, `owner_ids`, `owner_names`) VALUES
|
||||
(1, 1, 'Java SpringBoot Demo', 'kenaito-springboot-demo', '', '', 1, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin', '', '1,5', 'admin,guest');
|
||||
|
||||
CREATE TABLE `app_extr_attr` (
|
||||
`app_id` int NOT NULL,
|
||||
`env` varchar(16) NOT NULL,
|
||||
`attr_name` varchar(32) NOT NULL,
|
||||
`attr_value` varchar(100) DEFAULT NULL,
|
||||
PRIMARY KEY (`app_id`,`env`,`attr_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
||||
|
||||
CREATE TABLE `profile` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(32) DEFAULT NULL,
|
||||
`alias` varchar(32) DEFAULT NULL,
|
||||
`is_default` tinyint(1) DEFAULT '0',
|
||||
`enabled` tinyint(1) DEFAULT '1',
|
||||
`created_at` datetime DEFAULT NULL,
|
||||
`updated_at` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3;
|
||||
|
||||
INSERT INTO `profile` (`id`, `name`, `alias`, `is_default`, `enabled`, `created_at`, `updated_at`) VALUES
|
||||
(1, 'daily', '测试环境', 1, 1, NULL, NULL),
|
||||
(2, 'stage', '预发布环境', 1, 1, NULL, NULL),
|
||||
(3, 'online', '线上环境', 1, 1, NULL, NULL);
|
||||
|
||||
CREATE TABLE `app_config` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`group_id` int DEFAULT NULL,
|
||||
`app_id` int DEFAULT NULL,
|
||||
`app_code` varchar(32) DEFAULT NULL,
|
||||
`env` varchar(16) DEFAULT NULL,
|
||||
`version` varchar(32) DEFAULT NULL,
|
||||
`name` varchar(32) DEFAULT NULL,
|
||||
`type` smallint DEFAULT NULL,
|
||||
`contents` text,
|
||||
`enabled` tinyint(1) DEFAULT '1',
|
||||
`created_at` datetime DEFAULT NULL,
|
||||
`created_by` varchar(32) DEFAULT NULL,
|
||||
`updated_at` datetime DEFAULT NULL,
|
||||
`updated_by` varchar(32) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb3;
|
||||
|
||||
INSERT INTO `app_config` (`id`, `group_id`, `app_id`, `app_code`, `env`, `version`, `name`, `type`, `contents`, `enabled`, `created_at`, `created_by`, `updated_at`, `updated_by`) VALUES
|
||||
(1, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=330674
|
||||
database.name=kenaito_conf
|
||||
database.password=1235555888
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=777a
|
||||
', 1, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(2, 1, NULL, '', 'daily', 'latest', 'test.asc', 2, 'asdasdasdasd', 1, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(3, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', 'topicid', 2, 'asdasdasd', 0, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(4, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', 'aaaaa', 2, '啊啊啊啊啊啊', 0, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(5, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', '人人人人', 2, 'sdfsdfsdf', 0, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(6, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', 'rwerw', 2, 'dfsdfsdfs', 0, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(7, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', '大撒打算大', 2, '撒打算大饭店发生的', 0, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(8, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', 'wwwe', 2, '到付水电费水电费', 0, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(9, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', 'wwwewe', 2, 'sdfsdfsdffdfd', 0, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(10, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', 'wfffsdfsfsf', 2, '23424234234', 0, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(11, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', 'dsfs', 2, 'dffsdfsdfsd', 0, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(12, 1, NULL, '', 'daily', 'latest', 'hello.man1', 2, '是生生世世生生世世', 1, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(13, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', 'hello.man2', 2, '撒撒打算大', 1, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(14, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', 'hello.man3', 2, '撒打算大撒打算大苏打水水电费水电费是', 0, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(15, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', 'hello.man4', 2, '就会大富大贵地方得到的', 0, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(16, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', 'hello.man5', 2, '水电费水电费不不不不不', 0, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin'),
|
||||
(17, 1, 1, 'kenaito-springboot-demo', 'daily', 'latest', 'hello.man6', 2, '多少分啥地方444分嘎嘎嘎嘎', 0, '2026-10-18 09:33:20', 'admin', '2026-10-18 09:33:20', 'admin');
|
||||
|
||||
CREATE TABLE `app_config_history` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`origin_id` int DEFAULT NULL,
|
||||
`app_id` int DEFAULT NULL,
|
||||
`app_name` varchar(32) DEFAULT NULL,
|
||||
`app_names` varchar(64) DEFAULT NULL,
|
||||
`env` varchar(16) DEFAULT NULL,
|
||||
`version` varchar(32) DEFAULT NULL,
|
||||
`name` varchar(32) DEFAULT NULL,
|
||||
`type` smallint DEFAULT NULL,
|
||||
`contents` text,
|
||||
`created_at` datetime DEFAULT NULL,
|
||||
`created_by` varchar(32) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8mb3;
|
||||
|
||||
INSERT INTO `app_config_history` (`id`, `origin_id`, `app_id`, `app_name`, `app_names`, `env`, `version`, `name`, `type`, `contents`, `created_at`, `created_by`) VALUES
|
||||
(1, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8080
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.user=root
|
||||
database.password=123456
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 加密配置 ==========
|
||||
crypto.secretKey=k9#mP2$vL7qR4xN8
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(2, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8080
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.user=root
|
||||
database.password=123456
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 加密配置 ==========
|
||||
crypto.secretKey=k9#mP2$vL7qR4xN8
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(3, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.user=root
|
||||
database.password=123456
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 加密配置 ==========
|
||||
crypto.secretKey=k9#mP2$vL7qR4xN8
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(4, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.user=root
|
||||
database.password=1234567
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 加密配置 ==========
|
||||
crypto.secretKey=k9#mP2$vL7qR4xN8
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(5, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.user=root
|
||||
database.password=12345678
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 加密配置 ==========
|
||||
crypto.secretKey=k9#mP2$vL7qR4xN8
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(6, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.user=root
|
||||
database.password=12345678
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 加密配置 ==========
|
||||
crypto.secretKey=k9#mP2$vL7qR4xN8
|
||||
config.test=sdasdas
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(7, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=12345678
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 加密配置 ==========
|
||||
crypto.secretKey=k9#mP2$vL7qR4xN8
|
||||
config.test=sdasdas
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(8, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=12345678
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(9, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=1234567890
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(10, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=12345678
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(11, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=1234567822
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(12, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=1234567822
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(13, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=12345675
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(14, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=12345675
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大666
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(15, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=12345675
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(16, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=12345675888
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(17, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=12345675888
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(18, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=12345675777
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(19, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=128888
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(20, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=88887777
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(21, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=8888777799
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(22, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=88887777999880000
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(23, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=8888
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(24, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=88889999
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(25, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=888899990000
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(26, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=123456
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(27, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=123456789
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(28, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=123
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(29, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=1235555
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(30, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=3306
|
||||
database.name=kenaito_conf
|
||||
database.password=1235555777
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(31, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=33067
|
||||
database.name=kenaito_conf
|
||||
database.password=1235555777
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(32, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=33067
|
||||
database.name=kenaito_conf
|
||||
database.password=1235555
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(33, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=33067
|
||||
database.name=kenaito_conf
|
||||
database.password=1235555888
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=sdasdas是大大6667777888
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(34, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=33067
|
||||
database.name=kenaito_conf
|
||||
database.password=1235555888
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=666a
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(35, 7, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', '大撒打算大', 2, '撒打算大', '2026-10-18 09:33:20', 'admin'),
|
||||
(36, 1, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'application-dev.properties', 1, '# ========== 服务器配置 ==========
|
||||
server.port=8084
|
||||
|
||||
# ========== 数据库配置 ==========
|
||||
database.host=127.0.0.1
|
||||
database.port=33067
|
||||
database.name=kenaito_conf
|
||||
database.password=1235555888
|
||||
|
||||
# ========== JWT 配置 ==========
|
||||
jwt.secret=kenaito-conf-jwt-secret-2026
|
||||
jwt.expireHours=24
|
||||
|
||||
# ========== 新增配置 ==========
|
||||
config.test=777a
|
||||
', '2026-10-18 09:33:20', 'admin'),
|
||||
(37, 15, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'hello.man4', 2, '就会大富大贵地方', '2026-10-18 09:33:20', 'admin'),
|
||||
(38, 14, 1, '', 'Java SpringBoot Demo(kenaito-springboot-demo)', 'daily', 'latest', 'hello.man3', 2, '撒打算大撒打算大苏打水', '2026-10-18 09:33:20', 'admin');
|
||||
|
||||
CREATE TABLE `user` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`group_id` int DEFAULT NULL,
|
||||
`name` varchar(16) DEFAULT NULL,
|
||||
`password` varchar(64) DEFAULT NULL,
|
||||
`mobile` char(11) DEFAULT NULL,
|
||||
`email` varchar(32) DEFAULT NULL,
|
||||
`type` varchar(16) DEFAULT 'user',
|
||||
`enabled` tinyint(1) DEFAULT '1',
|
||||
`created_at` datetime DEFAULT NULL,
|
||||
`updated_at` datetime DEFAULT NULL,
|
||||
`last_logout_at` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3;
|
||||
|
||||
INSERT INTO `user` (`id`, `group_id`, `name`, `password`, `mobile`, `email`, `type`, `enabled`, `created_at`, `updated_at`, `last_logout_at`) VALUES
|
||||
(1, NULL, 'admin', '$2a$10$uHzjUffJ6LI1JhE5eMc41e91bkpGa1jI0vHZX6DNEDi8Ci511Q6Dq', '18888888888', 'tianjun@odboy.cn', 'superAdmin', 1, '2026-10-18 09:33:20', '2026-10-18 09:33:20', '2026-10-18 09:33:20'),
|
||||
(5, NULL, 'guest', '$2a$10$beUURwxRmvuRTfi.SyjHOusPUGc5SUF.8/RtVE.TykzzXrd6X3Qje', '18888888889', 'tianjun@odboy.cn', 'user', 1, '2026-10-18 09:33:20', NULL, '2026-10-18 09:33:20');
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
Reference in New Issue
Block a user