【发布时间】:2017-06-24 18:20:57
【问题描述】:
错误
org.springframework.beans.NotReadablePropertyException: Invalid property 'mytemplate' of bean class [at.test.Mytemplate]: Bean property 'mytemplate' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
Cause: org.thymeleaf.exceptions.TemplateProcessingException Error during execution of processor 'org.thymeleaf.spring4.processor.attr.SpringInputGeneralFieldAttrProcessor'
类
@Data
@Builder
public class Mytemplate{
String name;
}
HTML
<form id="myform" class="form-horizontal" data-toggle="validator" method="POST" role="form" th:action="@{'/save'}" th:object="${mytemplate}">
<input type="text" class="form-control" th:field="*{mytemplate.name}" required="required"/>
</form>
知道为什么会出现此错误吗?为什么我不能将龙目岛与百里香一起使用?
【问题讨论】:
标签: spring-mvc thymeleaf lombok