前端怎样快速数据渲染
1、首先在项目中maven中添加spring-boot-starter-thymeleaf和net.sourceforge.nekohtml

2、在项目的application.properties配置文件中添加spring.thymeleaf.mode = LEGACYHTML5去掉Thymeleaf对html的强校验

3、在java文件夹Controller目录创建HelloController类添加请求页面方法,增加hello参数

4、在resources文件夹templates目录下创建welcome页面中<h1>标签用th:text引进参数hello渲染标签值

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:43
阅读量:156
阅读量:174
阅读量:31
阅读量:80