Beispiel #1
0
 @Secured({"ROLE_ADMIN"})
 @RequestMapping(value = "/info", method = RequestMethod.DELETE)
 @ResponseBody
 public ResponseEntity<?> deleteInfo(@RequestBody InfoEntity info) throws Exception {
   infoService.updateDesigInfo(info);
   String jsonObj = "{\"msg\":\"Updated\"}";
   return new ResponseEntity<String>(jsonObj, HttpStatus.OK);
 }
Beispiel #2
0
  @RequestMapping(value = "/info", method = RequestMethod.GET)
  public ResponseEntity<?> retrieveInfo() {

    ArrayList<InfoEntity> info = infoService.retrieveSkills();

    return (null == info)
        ? new ResponseEntity<String>("No infos found for the value ", HttpStatus.NOT_FOUND)
        : new ResponseEntity<ArrayList<InfoEntity>>(info, HttpStatus.OK);
  }