`
wode66
  • 浏览: 739276 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

could not find a getter for ... in class ... 异常的解决方案

    博客分类:
  • J2EE
阅读更多

could not find a getter for cId in class xxx 异常的解决方案

 

这里提一下:get/set是不是不允许方法名中有连续两个大写字母

 

public String getODPType(){
return this.oDPType;
}

public void setODPType(String oDPType){
this.oDPType = oDPType;
}

这样写它就会报错,报找不到getter for oDPType的错误,但下面这样写就可以了
public String odpType;
public String getOdpType(){
return this.odpType;
}

public void setOdpType(String odpType){
this.odpType = odpType;
}

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics