@RequestMapping(value={"/{cg}/{k}","{cg}/{k}/"},method=RequestMethod.GET) @ResponseBody public RestWrapper listUsingKey(@PathVariable("cg") String configGroup,@PathVariable("k") String key,Principal principal){
  RestWrapper restWrapper=null;
  GetGeneralConfig getGeneralConfig=new GetGeneralConfig();
  GeneralConfig generalConfig=getGeneralConfig.byConigGroupAndKey(configGroup,key);
  if (generalConfig.getRequired() == 2) {
    restWrapper=new RestWrapper("Object with specified config_group and key not found",RestWrapper.ERROR);
  }
 else {
    restWrapper=new RestWrapper(generalConfig,RestWrapper.OK);
    LOGGER.info("Record with config group: " + configGroup + " and key:"+ key+ "selected from General Config by User:"+ principal.getName());
  }
  return restWrapper;
}

@ RequestMapping ( value = { "/{cg}/{k}" , "{cg}/{k}/" } , method = RequestMethod . GET ) @ ResponseBody public RestWrapper listUsingKey ( @ PathVariable ( "cg" ) String configGroup , @ PathVariable ( "k" ) String key , Principal principal ) { RestWrapper restWrapper = null ; GetGeneralConfig getGeneralConfig = new GetGeneralConfig ( ) ; GeneralConfig generalConfig = getGeneralConfig . byConigGroupAndKey ( configGroup , key ) ; if ( generalConfig . getRequired ( ) == 2 ) { restWrapper = new RestWrapper ( "Object with specified config_group and key not found" , RestWrapper . ERROR ) ; } else { restWrapper = new RestWrapper ( generalConfig , RestWrapper . OK ) ; LOGGER . info ( "Record with config group: " + configGroup + " and key:" + key + "selected from General Config by User:" + principal . getName ( ) ) ; } return restWrapper ; }
this method calls proc getgenconfigproperty and fetches a record from generalconfig table corresponding to config group and key passed .
