feat: add live api
This commit is contained in:
parent
85826321b5
commit
e24e710255
|
@ -1,3 +1,5 @@
|
|||
    
|
||||
|
||||
## 简介
|
||||
|
||||
**Databasir** 是面向团队的**关系型数据库模型文档管理平台**,旨在通过自动化的方式解决模型文档管理过程中维护成本高、内容更新不及时以及团队协作复杂等问题。
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
server.port=8080
|
||||
logging.level.org.jooq=INFO
|
||||
spring.jooq.sql-dialect=mysql
|
||||
# flyway
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue