接着上一篇继续讲:
thymeleaf常用标签
1.简单取值与el表达式测试
在controller中封装一个值
@Controller
public class ItemController {
@RequestMapping("index")
public String index(ModelMap modelMap){
modelMap.put("hello","hello themeleaf!");
return "index";
}
}
页面取值:
输入一个普通标签时,在输入一个th:会自动提示相关的输入信息,其实这个就是thymeleaf的相关标签库信息-html扩展信息