Spring 实战 第六版 学习笔记
There is no nutrition in the blog content. After reading it, you will not only suffer from malnutrition, but also impotence.
The blog content is all parallel goods. Those who are worried about being cheated should leave quickly.
<!DOCTYPE html>
<html xmlns = "http://www.w3.org/1999/xhtml" xmlns:th = "http://www.thymeleaf.org">
<head>
<title>Taco Cloud</title>
<link rel = "stylesheet" th:href = "@{/styles.css}" />
</head>
<body>
<h1>Design your taco!</h1>
<img th:src = "@{/images/TacoCloud.png}" />
<form method = "post" th:object = "${taco}">
<span class="validationError" th:if="${#fields.hasErrors('ingredients')}" th:errors="*{ingredients}">Ingredient Error</span>
<div class = "grid">
<div class = "ingredient-group" id = "warps">
<h3>Deginate your warp:</h3>
<div th:each = "ingredient : ${wrap}">
<input th:field = "*{ingredients}" type = "checkbox" th:value = "${ingredient.id}"/>
<!-- <input th:field = "*{name}" type = "checkbox" th:value = "${ingredient.id}"/> -->
<!-- <input name = "ingredient" type = "checkbox" th:value = "${ingredient.id}"/> -->
<span th:text = "${ingredient.name}">xxx</span>
</div>
</div>
<div class = "ingredient-group" id = "proteins">
<h3>Pick yourprotein:</h3>
<div th:each = "ingredient : ${protein}">
<input th:field = "*{ingredients}" type = "checkbox" th:value = "${ingredient.id}"/>
<span th:text = "${ingredient.name}">xxx</span>
</div>
</div>
<div class= "ingredient-group" id = "cheeses">
<h3>Choose your cheese:</h3>
<div th:each = "ingredient : ${cheese}">
<input th:field = "*{ingredients}" type = "checkbox" th:value = "${ingredient.id}"/>
<span th:text = "${ingredient.name}">xxx</span>
</div>
</div>
<div class = "ingredient-group" id = "veggies">
<h3>Determine your veggies:</h3>
<div th:each = "ingredient : ${veggies}">
<input th:field = "*{ingredients}" type = "checkbox" th:value = "${ingredient.id}"/>
<span th:text = "${ingredient.name}">xxx</span>
</div>
</div>
<div class = "ingredinet-group" id = "sauces">
<h3>Select your sauce:</h3>
<div th:each = "ingredient : ${sauce}">
<input th:field = "*{ingredients}" type = "checkbox" th:value = "${ingredient.id}"/>
<span th:text = "${ingredient.name}">xxx</span>
</div>
</div>
</div>
<div>
<h3>Name your taco creation:</h3>
<input type = "text" th:field = "*{name}"/>
<span class="validationError" th:if="${#fields.hasErrors('name')}" th:errors="*{name}">Name Error</span>
<br/>
<button>Submit Your Taco</button>
<br/>
</div>
</form>
</body>
</html>