mybatis中默认的处理枚举类型的handler有
如果要处理一些特殊的情况下字段内容字段的转换,需要自定义处理器,比如如下例子要处理数据库中默认字段值为""空字符串的问题
import org.apache.commons.lang.StringUtils;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
/**
* @author
* @date 2019/4/9 18:13
* description:解决数据库默认""无法对应到Enum的问题
*/
public class RepaidTypeEnumHandler> extends BaseTypeHandler {
private Class type;
public RepaidTypeEnumHandler() {
}
public RepaidTypeEnumHandler(Class type) {