Springboot整合Mybatis遇到的问题

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

  • **Mapper.xml的文件名要与对应的接口名相同
  • **Mapper.xml中的namespace不要写错

Field categoryMapper in service.VideoService required a bean of type ‘dao.CategoryMapper’ that could not be found.

  • 不要忘记添加@MapperScan(“接口包位置”)

java.lang.IllegalArgumentException: Parameter Maps collection does not contain value for VideoMapper.int

  • 在**Mapper.xml中将parameterMap改为parameterType

你可能感兴趣的:(SpringBoot)