【发布时间】:2017-11-12 16:39:29
【问题描述】:
所以,我的 POJO 类中有一个属性 SQL.Date。我想使用 Vaadin 组件中的 Binder 来绑定它,但总是这样返回:
Property type 'java.sql.Date' doesn't match the field type 'java.time.LocalDate'. Binding should be configured manually using converter.
所以这是我在 POJO 类中包含的 Getter Setter
public Date getDateOfBirth() {
return dateOfBirth;
}
public void setDateOfBirth(Date dateOfBirth) { this.dateOfBirth = dateOfBirth; }
这是我使用 Binder 组件的时候:
binder = new Binder<>(Person.class);
binder.bindInstanceFields( this );
仅供参考,我使用 Spring Boot JPA 获取数据。报错信息和Spring Boot的使用有关系吗?
【问题讨论】:
-
哪个版本? Vaadin8?
-
是的,Vaadin 8.0.0
-
如果您不提供完整的堆栈跟踪,则很难判断是哪个库导致它。
标签: java spring-boot spring-data-jpa vaadin sql-date-functions