org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column 'belong_to' from result set. Cause: java.lang.IllegalArgumentException: No enum constant com.connext.soa.platform.category.enums.MediaBelongEnum.0
使用mybatis查询返回实体类MediaEntity
List<MediaEntity> mediaList = mediaService.selectByExample(Q.from(MediaEntity.class) .eq(MediaEntity::getRelationId, id) .eq(MediaEntity::getPartnerId, partnerId) .example());
SQL返回的的belong_to值在枚举类存在,
添加注释
@ColumnType(typeHandler = DictEnumHandler.class)