一、pom.xml添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
二、application.properties添加设置,开发环境设置Thymeleaf缓存不可用
spring.thymeleaf.cache=false
三、画面做成,示例参考以下代码:
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Getting Started: Serving Web Content</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<form method="post" action="/shangPin/chaXunShangPinByBianHao">
<div>
<span>
<label>商品编号:</label>
<input type="text" na