报错信息:
### Cause: org.apache.ibatis.reflection.ReflectionException: Could not set property 'id' of 'class com.shiyaxin.Bean.Account' with value '1' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'id' in 'class com.shiyaxin.Bean.Account'
意为:
原因:org.apache.ibatis.reflection。ReflectionException:无法设置com.shiyaxin.Bean类的属性“id”。Account' with value '1原因:org.apache.ibatis.reflection。ReflectionException:在“com.shiyaxin.Bean.Account类”中没有为名为“id”的属性设置setter。
mybatis里用的是反射关系。orm:对象关系映射
一般,数据库的字段跟表名的字段一定要一样
如果自定义的属性名,要配置对应的数据库列的名字,大小写一定保持一致
属性名是什么:就property=“属性名”
列名数据库一致,就column=“列名”