コード例 #1
0
 @RequestMapping(value = "/count", method = RequestMethod.GET)
 public @ResponseBody String getTotalUser(@RequestBody Project proj) {
   int count = projectService.countProjects();
   return "{\"usercount\" : " + count + "}";
 }
コード例 #2
0
 @RequestMapping(value = "/all", method = RequestMethod.GET)
 public @ResponseBody Iterable<Project> getAllProjects() {
   System.out.println(projRepository.findAll());
   Iterable<Project> projects = projectService.getAllProjects();
   return projRepository.findAll();
 }