这个问题困扰我很久
用springboot和mybtis自动生成代码的时候,编译的insert有时会出现
There was an unexpected error (type=Internal Server Error, status=500).
nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named '_deptName' in 'class com.ams.ams.entity.Depart'
网上很多方法是针对
There is no getter for property named '_deptName' in string
要解决类的问题,我们需要将类中的属性全部做一个替换,一般来说是去掉中中间的短横线就行了