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渲染标签值