Ejemplo n.º 1
0
 /** GET /parameters/:id -> get the "id" parameter. */
 @RequestMapping(
     value = "/parameters/{id}",
     method = RequestMethod.GET,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<Parameter> getParameter(@PathVariable Long id) {
   log.debug("REST request to get Parameter : {}", id);
   Parameter parameter = parameterRepository.findOne(id);
   return Optional.ofNullable(parameter)
       .map(result -> new ResponseEntity<>(result, HttpStatus.OK))
       .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));
 }