1.在pom文件添加:

<!-- SpringBoot集成thymeleaf模板 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

2.在html页面的头部添加
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >

3.在java Controller中添加
@GetMapping("/get")
public String edit(ModelMap mmap)
{
//返回的实体类信息
mmap.put("baseUser", "baseUser");
return "service/BaseUser/edit";
}

4.在html文件中用 th:
object="${baseUser}"接收参数对象
例:
<input th:value="${baseUser.userName}">