Esempio n. 1
0
 @RequestMapping(value = "/count", method = RequestMethod.GET)
 public @ResponseBody String getTotalUser(@RequestBody Project proj) {
   int count = projectService.countProjects();
   return "{\"usercount\" : " + count + "}";
 }
Esempio n. 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();
 }