在使用MyBatis的时候,若实体类上使用了lombok的@Builder注解,那么在查询数据做映射的时候会出现Cannot determine value type from string 'xxxxxx'错误,产生这个错误的原因是当使用了@Builder注解之后会默认把无参构造方法忽略掉,创建一个全参的构造方法,比如
/** * Put on any method or constructor to make lombok pretend it doesn't exist, * i.e., to generate a method which would otherwise be skipped due to possible conflicts. */ @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) @Retention(RetentionPolicy.SOURCE) public@interface Tolerate { }