@RequestMapping(consumes = "application/json", method = RequestMethod.POST) @Override public HttpEntity<ResponseBean> save(@RequestBody ItemBrand entity) throws SpartanPersistenceException, Exception { ResponseBean responseBean = new ResponseBean(); org.springframework.http.HttpStatus httpStatus = org.springframework.http.HttpStatus.CREATED; try { itemBrandrepo.save(entity); responseBean.add("success", true); responseBean.add("message", "Successfully Created"); responseBean.add("data", entity._getPrimarykey().toString()); httpStatus = org.springframework.http.HttpStatus.CREATED; } catch (org.springframework.transaction.TransactionException e) { throw new com.athena.framework.server.exception.repository.SpartanTransactionException( "can not save", e.getCause()); } return new org.springframework.http.ResponseEntity<ResponseBean>(responseBean, httpStatus); }