feat: add live api

This commit is contained in:
vran 2022-04-12 18:07:21 +08:00
parent 85826321b5
commit e24e710255
4 changed files with 11 additions and 8 deletions
README.md
api/src/main
plugin/src/main/java/com/databasir/core/meta/repository/impl/jdbc

View File

@ -1,3 +1,5 @@
![release-version](https://img.shields.io/github/v/release/vran-dev/databasir?include_prereleases&style=for-the-badge) ![downloads](https://img.shields.io/github/downloads/vran-dev/databasir/total?style=for-the-badge) ![language](https://img.shields.io/github/languages/top/vran-dev/databasir?style=for-the-badge) ![licence](https://img.shields.io/github/license/vran-dev/databasir?style=for-the-badge) ![stars](https://img.shields.io/github/stars/vran-dev/databasir?style=for-the-badge)
## 简介
**Databasir** 是面向团队的**关系型数据库模型文档管理平台**,旨在通过自动化的方式解决模型文档管理过程中维护成本高、内容更新不及时以及团队协作复杂等问题。

View File

@ -1,13 +1,21 @@
package com.databasir.api;
import com.databasir.common.JsonData;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
@Controller
public class IndexController {
@GetMapping("/live")
@ResponseBody
public JsonData<String> live() {
return JsonData.ok("ok");
}
@GetMapping("/")
public String index() {
return "index.html";

View File

@ -1,3 +1,4 @@
server.port=8080
logging.level.org.jooq=INFO
spring.jooq.sql-dialect=mysql
# flyway

View File

@ -24,14 +24,6 @@ public class JdbcForeignKeyMetaRepository implements ForeignKeyMetaRepository {
ResultSet keyResult = null;
try {
keyResult = connection.getMetaData().getImportedKeys(databaseName, schemaName, tableName);
} catch (SQLException e) {
log.warn("warn: ignore foreign keys in " + databaseName + "." + tableName + ", " + e.getMessage());
return foreignKeys;
}
try {
keyResult = connection.getMetaData()
.getImportedKeys(databaseName, schemaName, tableName);
while (keyResult.next()) {
String fkTableName = keyResult.getString("FKTABLE_NAME");
String fkColumnName = keyResult.getString("FKCOLUMN_NAME");