@RequestMapping(value="/{uname}",method=RequestMethod.DELETE) @ResponseBody public RestWrapper delete(@PathVariable("uname") String username,Principal principal){
  RestWrapper restWrapper=null;
  try {
    usersDAO.delete(username);
    restWrapper=new RestWrapper(null,RestWrapper.OK);
    LOGGER.info("Record with name:" + username + " deleted from Users by User:"+ principal.getName());
  }
 catch (  Exception e) {
    LOGGER.error(e);
    restWrapper=new RestWrapper(e.getMessage(),RestWrapper.ERROR);
  }
  return restWrapper;
}

@ RequestMapping ( value = "/{uname}" , method = RequestMethod . DELETE ) @ ResponseBody public RestWrapper delete ( @ PathVariable ( "uname" ) String username , Principal principal ) { RestWrapper restWrapper = null ; try { usersDAO . delete ( username ) ; restWrapper = new RestWrapper ( null , RestWrapper . OK ) ; LOGGER . info ( "Record with name:" + username + " deleted from Users by User:" + principal . getName ( ) ) ; } catch ( Exception e ) { LOGGER . error ( e ) ; restWrapper = new RestWrapper ( e . getMessage ( ) , RestWrapper . ERROR ) ; } return restWrapper ; }
this method calls proc deleteusers and removes record corresponding to username passed .
