2018年1月

如需了解Thymeleaf以及Thymeleaf整合Spring Boot,请参考《Spring boot 之 Web应用开发篇》、《Spring Boot 之 Thymeleaf 篇》。Thymeleaf的基本表达式有:${...} 变量表达式*{...} 选择变量表达式#{...} 消息表达式@{...} 链接url表达式#maps 工具对象表达式${}变量表达式:用于访问容器上下文环境中的变量,功能同jstl中${}。protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws Serv...

阅读全部

在Spring boot中,官方默认采用的是Thymeleaf模块引擎,通过org.springframework.boot.autoconfigure.thymeleaf包对Thymeleaf进行了自动配置。通过Thymeleaf2Configuration类对集成所需要的Bean进行自动配置,包括templateResolver、templateViewResolver 和templateEngine 的配置。通过ThymeleafProperties来配置Thymeleaf,在application.properties中以 spring.thymeleaf开头来配置,通过查看Th...

阅读全部