org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘dname‘...

当我访问:
http://localhost:8001/dept/add?dName=aa的时候

发现问题:
org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘dname’ in ‘class com.thunder.springcloud.pojo.Dept’
org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘dname‘...
问题翻译过来的意思是:
org.apache.ibatis.reflection。ReflectionException:在class com.thunder.springcloud.pojo.Dept中没有名为dname的属性的getter

解决问题:
根据以往的解决类似bug的经验来看,出现问题的地方就那几个,使用了mybatis框架的xml配置错误,或者使用注解属性配置错误,接口方法的参数,在数据库字段和实体类名字不对应的情况下没有添加注解…
查看com.thunder.springcloud.pojo.Dept是否有dname这个属性?
org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘dname‘...
有这个属性,也有get和set方法,实体类没有问题。

那我直接找我的代码出现dname的地方,发现了问题:
org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘dname‘...

把dname改成dName重新运行,问题就解决了。