Spring 在方法之间共享@modeldattribute

Spring 在方法之间共享@modeldattribute,spring,spring-mvc,modelattribute,Spring,Spring Mvc,Modelattribute,我是spring的新手,我有一个控制器: @ModelAttribute("mediaJson") @Transactional(value=CLIENT_TRANSACTION_MANAGER, readOnly=true) public String getPlayerMedia(@PathVariable String playerHash, @PathVariable String mediaId) throws ServiceException, JsonProcessingExcep

我是spring的新手,我有一个控制器:

@ModelAttribute("mediaJson")
@Transactional(value=CLIENT_TRANSACTION_MANAGER, readOnly=true)
public String getPlayerMedia(@PathVariable String playerHash, @PathVariable String mediaId) throws ServiceException, JsonProcessingException {
    PlayerController playerController = new PlayerController();
    playerController = authenticationService.authenticatePlayerHash(playerHash);
    PlayerMediaDTO media = playerService.getPlayerMedia(playerController, mediaId, null, null, null);
    ObjectMapper mapper = new ObjectMapper();
    String json = mapper.writeValueAsString(media);
    return json;
}

@ModelAttribute("attrs")
public ViewAttributes getProxyPath(@ModelAttribute("mediaJson") String jsonString) {
    ViewAttributes attr = new ViewAttributes();
    attr.setProxy(proxy);
    attr.setDescription(jsonString);
    return attr;
}
//View 
@RequestMapping(value="/index/{playerHash}/{mediaId}", method=RequestMethod.GET)
public String loadMediaJson(@PathVariable String playerHash, @PathVariable String mediaId, ModelMap model) {
    return "index";
}
请注意,我想访问attrs属性的mediaJson属性来填充它。我该怎么做? 我在这里尝试过,但似乎只有当我在setDescription行上放置调试断点时,它才起作用,可能是因为同步

有人能帮我吗