There is no getter for property named ‘pCode‘ in ‘classXXX‘
程序员文章站
2022-05-04 11:44:06
说明使用easypoi导入模板数据,总提示“There is no getter for property named ‘pCode’ in ‘classXXX’”。排查方向大致如下:1.如果是mybatis报错,那么检查是否拼写错误!这个很多人犯错。2.如果是lombok注解,然后变量名是pCode这种,getter和setter方法都是转为setpCode(),getpCode()!!!前面的字母是小写的!!!但是easypoi里面是PCode(P大写)3.知道是问题2后,修改了成员变量名后,有...
说明
使用easypoi导入模板数据,总提示“There is no getter for property named ‘pCode’ in ‘classXXX’”。排查方向大致如下:
1.如果是mybatis报错,那么检查是否拼写错误!这个很多人犯错。
2.如果是lombok注解,然后变量名是pCode这种,getter和setter方法都是转为setpCode(),getpCode()!!!前面的字母是小写的!!!但是easypoi里面是PCode(P大写)
3.知道是问题2后,修改了成员变量名后,有使用热部署更新的,请重启系统,不要用热部署更新该实体类。
我的就是2和3这种情况。使用jrebel热部署后,easypoi的
cn.afterturn.easypoi.util.PoiReflectorUtil#getSetMethod该方法还是存储旧的成员变量名,所以重启系统就可以了。
调试情况如下:
本文地址:https://blog.csdn.net/m0_47360218/article/details/107337538
上一篇: Python画树状图
推荐阅读
-
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'