org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题,即在mybatis中dao接口与mapper配置文件在做映射绑定的时候出现问题,简单说,就是接口与xml要么是找不到,要么是找到了却匹配不到。
最后上网找了半天,终于明白是配置文件没有配置好mybatis。如下图配置就可以解决:
# mybatis
mybatis.type-aliases-package=com.springboot.entity
mybatis.mapper-locations=classpath:mapper/SysUserMapper.xml
mybatis.configuration.map-underscore-to-camel-case=true
注意:如果还是不行就是dao接口与xml的文件名不一致。