集群列表、新增集群

This commit is contained in:
许晓东
2022-01-04 21:06:50 +08:00
parent 2427ce2c1e
commit 6f9676e259
11 changed files with 455 additions and 1 deletions

View File

@@ -1,8 +1,11 @@
package com.xuxd.kafka.console.controller;
import com.xuxd.kafka.console.beans.dto.ClusterInfoDTO;
import com.xuxd.kafka.console.service.ClusterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -23,4 +26,14 @@ public class ClusterController {
public Object getClusterInfo() {
return clusterService.getClusterInfo();
}
@GetMapping("/list")
public Object getClusterInfoList() {
return clusterService.getClusterInfoList();
}
@PostMapping
public Object addClusterInfo(@RequestBody ClusterInfoDTO dto) {
return clusterService.addClusterInfo(dto.to());
}
}