Spring MVC 3.2 Thymeleaf Ajax Fragments

前端 未结 3 843
被撕碎了的回忆
被撕碎了的回忆 2020-12-12 12:09

I\'m building application with Spring MVC 3.2 and Thymeleaf templating engine. I\'m a beginner in Thymeleaf.

I have everything working, including Thymeleaf but I was

3条回答
  •  粉色の甜心
    2020-12-12 12:40

    Rendering only Thymeleaf fragments also works well with ModelAndView.

    Your controller

    @RequestMapping(value = "/feeds", method = RequestMethod.GET)
    public ModelAndView getFeeds() {
        LOGGER.debug("Feeds method called..");
        return new ModelAndView("feeds :: resultsList");
    }
    

    Your view

    
    
    
    
    
        
    A test fragment
    A test fragment

    What's actually rendered

    A test fragment
    A test fragment

提交回复
热议问题