Change-Id: I0119780b7903bd84874c5ff9eca1aadb981e01b3
Issue-ID: DCAEGEN2-1658
Signed-off-by: ZhangZihao <zhangzihao@chinamobile.com>
return retString;
}
+ @GetMapping("/idAndName")
+ @ResponseBody
+ @ApiOperation(value="Gat all databases id and name")
+ public Map<Integer, String> listIdAndName() {
+ Iterable<Db> ret = dbRepository.findAll();
+ Map<Integer, String> map = new HashMap<>();
+ for(Db db : ret)
+ {
+ log.info(db.getId() + "\t"+ db.getName());
+ map.put(db.getId(), db.getName());
+ }
+ return map;
+ }
+
//Create a DB
@PostMapping("")
@ResponseBody