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