feat: add test connection api (#4)

This commit is contained in:
vran
2022-01-26 14:17:10 +08:00
committed by GitHub
parent 604cb4ab47
commit 4bf7f5161a
11 changed files with 115 additions and 21 deletions

View File

@@ -55,4 +55,10 @@ public class ProjectController {
ProjectListCondition condition) {
return JsonData.ok(projectService.list(page, condition));
}
@PostMapping(Routes.GroupProject.TEST_CONNECTION)
public JsonData<Void> testConnection(@RequestBody @Valid ProjectTestConnectionRequest request) {
projectService.testConnection(request);
return JsonData.ok();
}
}

View File

@@ -57,6 +57,8 @@ public interface Routes {
String UPDATE = BASE + "/groups/{groupId}/projects";
String DELETE = BASE + "/groups/{groupId}/projects/{projectId}";
String TEST_CONNECTION = BASE + "/projects/test_connection";
}
interface Document {

View File

@@ -1,5 +1,5 @@
server.port=8080
logging.level.org.jooq=DEBUG
logging.level.org.jooq=INFO
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=root
spring.datasource.password=123456