数据库中存在int型的字段,但是初始值为null,mybatis取值之后就会报错, org.apache.ibatis.binding.BindingException: Mapper method 'getSort' (xx.yy.cc.DxxDAO) attempted to return null from a method with a primitive return type (int). 解决:采用了取巧的方式,将实体类对应的该字段设置成String类型,mybatis取出来之后自