There is no getter for property named 'user_id' in 'class com.taiyi.biz.domain.TPoint'这是什么错误
时间: 2023-11-28 16:06:44 浏览: 109
这个错误提示说明在Java类 com.taiyi.biz.domain.TPoint 中,没有名为 user_id 的属性的 getter 方法。通常,当你使用某个属性时,Java 会自动调对应的 getter 方法来获取属性的值,但是如果这个属性没有对应的 getter 方法,就会抛出这个错误。
你需要在 TPoint 类中添加一个名为 getUser_id 的方法,返回 user_id 属性的值。例如:
```
public class TPoint {
private int user_id;
public int getUser_id() {
return user_id;
}
public void setUser_id(int user_id) {
this.user_id = user_id;
}
}
```
这样就能解决这个错误了。
相关问题
There is no getter for property named 'user_id' in 'class com.taiyi.biz.domain.TPoint'
这个错误提示是在 Java 代码中出现的,意思是在 `TPoint` 类中没有名为 `user_id` 的属性的 getter 方法。你需要检查 `TPoint` 类中是否定义了 `user_id` 属性,并且是否提供了对应的 getter 方法。如果没有定义该属性,你需要考虑在 `TPoint` 类中添加该属性及其 getter 方法。如果该属性已经定义了,你需要确认 getter 方法的命名是否符合规范,即以 `get` 开头,后面紧跟该属性的首字母大写的名称。例如,如果属性名为 `user_id`,则 getter 方法应该命名为 `getUserId()`。
org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'create_date' in 'class com.itgaohe.pojo.Users'
引用[1]:错误提示中提到了"org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'createBy' in 'class com.smbms.pojo.User'",这个错误是因为在'com.smbms.pojo.User'类中没有名为'createBy'的属性的getter方法。[1]同样,引用[3]中也提到了类似的错误提示,即"There is no getter for property named 'create_date' in 'class com.itgaohe.pojo.Users'"。根据错误提示,我们可以确定这两个类中确实没有对应的属性的getter方法。要解决这个问题,我们需要在相应的类中添加对应属性的getter方法。
阅读全文
相关推荐
















