Spring Boot整合Thymeleaf
# 一、创建Spring Boot项目ThymeleafDemo
1.完成项目初始化工作
- 为项目添加依赖
- 查看pom.xml文件
2.在全局配置文件里配置Thymeleaf属性
3.创建登录控制器LoginController
package net.lxq.spring.controller;
import net.lxq.spring.bean.Person;
import net.lxq.spring.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import javax.servlet.http.HttpServletRequest;
import java.util.Calendar;
@Controller
public class LoginController {
@GetMapping("/toLoginPage")
publ