请在这里查看:http
:
//mybatis.github.io/mybatis-3/configuration.html#typeHandlers
要使用LocalDate和Timestamp,您必须编写一个自定义typeHandler,如下所示:
// ExampleTypeHandler.java@MappedTypes(LocalDate.class)public class LocalDateTypeHandler extends baseTypeHandler<LocalDate> { //implement all methods}像这样配置config.xml:
<!-- mybatis-config.xml --><typeHandlers> <typeHandler handler="your.package.LocalDateTypeHandler"/></typeHandlers>
应该会有所帮助。



