mybatis:
mapper-locations: classpath:/mybatis/mapper/*.xml
type-aliases-package: com.zhaofeng.deliverymanagement.pojo
configuration:
map-underscore-to-camel-case: true
- 实体类没有getter和setter方法,可能会出现以下错误
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class com.zhaofeng.deliverymanagement.pojo.UserPojo and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.zhaofeng.deliverymanagement.common.JsonResult["data"]->java.util.ArrayList[0])
<!-- 用户详细信息 -->
<resultMap id="UserDetailMap" type="UserPojo">