Comment appeler la méthode de l'objet de Thymeleaf?

Mon template ne pas voir les objets, est passé de Printemps.

Mon code:

public class PublicModelAndView extends ModelAndView {

    @Autowired
    TemplateModulesHandler templateModulesHandler;

    public void init() {

        setViewName("index");
        CSSProcessor cSSProcessor = new CSSProcessor();
        cSSProcessor.setSiteRegion("public");
        super.addObject("CSSProcessor", cSSProcessor);

        JSProcessor jSProcessor = new JSProcessor();
        super.addObject("JSProcessor", jSProcessor);

        templateModulesHandler.setPublicModelAndView(this);

    }

}

Contolleur code:

@SpringBootApplication
@Controller
public class IndexPage {

    @Autowired
    PublicModelAndView publicModelAndView;
    @Autowired
    OurServicesBean ourServicesBean;
    @Autowired
    PortfolioBean portfolioBean;

    @RequestMapping(value = "/", method = RequestMethod.GET)
    public ModelAndView indexPage() {

        publicModelAndView.setTemplate("publicSiteIndexPage");
        publicModelAndView.addObject("ourServices", ourServicesBean.getMenu());
        publicModelAndView.addObject("portfolioWorkTypes", portfolioBean.getWorkTypes());
        publicModelAndView.addObject("portfolioWorks", portfolioBean.getWorks());

        return publicModelAndView;

    }

}

Principal du modèle de code:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      >
    <head th:include="headerAndFooter/fragments/header :: publicSiteHeader">
        <title></title>
    </head>
    <body>
        hello!
    </body>

</html>

Fragment de code:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">

    <head th:fragment="publicSiteHeader">

        <title>SOME TITLE</title>

         ${CSSProcessor.setDebugCaller("Public")}
         ${CSSProcessor.setSiteRegion("public")}
         ${CSSProcessor.addCSS("/css/main.css")}
    </head>
    <body>

    </body>
</html>

Comme résultat je voir le code de la méthode d'appel, comme

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>

        <title>SOME TITLE</title>

         ${CSSProcessor.setDebugCaller("Public")}
         ${CSSProcessor.setSiteRegion("public")}
         ${CSSProcessor.addCSS("/css/main.css")}

Pourquoi thymeleaf n'ai pas l'appel de méthodes, mais de l'impression de ce texte à la page de sortie? Dans l'exemple de http://www.thymeleaf.org/doc/tutorials/2.1/usingthymeleaf.html l'appel de méthode a la même syntaxe, comme

${person.createCompleteName()}

Le même code fonctionne bien avec JSP, mais ne fonctionnent pas avec thymeleaf.

InformationsquelleAutor Arthur | 2015-01-21