private ModelAndView dispatch(String view) {

    List<FeedItem> items = feedItemRepository.findAll();

    ModelAndView mav = new ModelAndView();
    mav.setViewName(view);
    mav.addObject("feedContent", items);
    return mav;
  }
  @RequestMapping(value = "json/data", method = RequestMethod.GET)
  public @ResponseBody List<FeedItem> getFeedItemsInJSON() {

    List<FeedItem> items = feedItemRepository.findAll();
    return items;
  }