/** @return */ @RequestMapping(value = "/list/all", method = RequestMethod.GET) public @ResponseBody Persons getPersons() { Persons persons = new Persons(); // Make a query if parameter is not null persons.setPersons(entityService.getAll()); return persons; }
/** * @param {@link String} lastName * @return (@link List} of {@link Entity}. */ @RequestMapping(value = "/person/{lastName}", method = RequestMethod.GET) public @ResponseBody Persons sumbitForm(@PathVariable("lastName") String lastName) { // Create reservation list Persons persons = new Persons(); // Make a query if parameter is not null if (lastName != null) { persons.setPersons(entityService.getEntity(lastName)); } return persons; }