- 针对在第2章的2.1(展示信息),2.2(提交表单).
- 如果出现IDEA中出现:
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates//Two/orderForm.html]")] with root cause
的错误,就表示在你的orderForm.html页面中,肯定有一个属性是你需要展示的类的名称不符合的,此时网页的返回应该是"timestamp": "2023-03-22T08:07:31.667+00:00", "status": 500, "error": "Internal Server Error", "path": "/orders/current"
- 比如在我的类Order中有一个
ccCvv
属性, - 现在发送到页面上
orderForm.html
上的一个th:field="{ccCVV}"
的属性与Order类中的ccCvv
不符合就会出现以上错误(一个小写一个大写)