首页 > 编程知识 正文

springboot是什么框架,build-operate-transfer

时间:2023-05-05 03:52:36 阅读:175581 作者:4408

**

springboot模板的使用方法**

@ controllerpublicclasshellocontroller { @ request mapping (“/test”) publicstringtest ) model model.addatribution model 返回' /测试'; 将视图添加到控制器

用html调用

bodyh3test/h3! -不转义--div th:text='${msg}'/div! -转义h1-- div th : u text=' $ { msg } '/div HR h3th : each=' user 3360 $ { users } ' th 3360 text=' $ { user } '/H3

任性的眼睛引入了templates依赖

文件下的test可以直接识别,简单方便

! ----templates---- dependencygroupidorg.thyme leaf/groupidartifactidthymeleaf-spring5/artifact id/dependency

html lang=' en ' xmlns : th=' http://www.w3.org/1999/XHTML '一个不转义

以下是执行的结果

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。