@Transactional(value = "transactionManager")
 @RequestMapping(value = "/categories", produces = MediaType.APPLICATION_JSON_VALUE)
 public @ResponseBody List<Category> getCategories() {
   return expensesService.getCategories();
 }
 @Transactional(value = "transactionManager")
 @RequestMapping(method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE)
 public @ResponseBody Expense put(@RequestBody Map json) {
   return expensesService.editExpense(json);
 }
 @Transactional(value = "transactionManager")
 @RequestMapping(value = "/sum", produces = MediaType.APPLICATION_JSON_VALUE)
 public @ResponseBody String getSum() {
   return expensesService.getSum().toString();
 }
 @Transactional(value = "transactionManager")
 @RequestMapping(value = "/stat", produces = MediaType.APPLICATION_JSON_VALUE)
 public @ResponseBody String getStatistics(@RequestParam String currency) {
   ObjectMapper r = new ObjectMapper();
   return expensesService.getStatistics(currency).toString();
 }