There is no getter for property named 'xxx' in 'class com.ams.ams.entity.xxx'
程序员文章站
2022-07-15 13:45:48
...
这个问题困扰我很久
用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
要解决类的问题,我们需要将类中的属性全部做一个替换,一般来说是去掉中中间的短横线就行了
推荐阅读
-
There is no getter for property named ‘pCode‘ in ‘classXXX‘
-
There is no getter for property named ‘name‘ in ‘class java.lang.String‘
-
There is no getter for property named ‘name‘ in ‘class java.lang.String
-
Mybatis报错:There is no getter for property named ‘xxxx‘ in ‘class xxxx
-
Mybatis报错:There is no getter for property named 'xxxx' in 'class xxxx
-
Mybatis报错:There is no getter for property named ‘xxxx‘ in ‘class xxxx
-
Mybatis报错:There is no getter for property named ‘xxxx‘ in ‘class xxxx
-
There is no getter for property named 'xxx' in 'class java.lang.xxxx'解决办法
-
Mybatis There is no getter for property named 'xxxx' in 'class java.lang.String'
-
There is no getter for property named 'xxx' in 'class com.ams.ams.entity.xxx'