There is no getter for property named 'building' in 'class com.woniuxy.model.Building'
时间: 2023-11-28 11:42:29 浏览: 137
这个错误提示意味着在类com.woniuxy.model.Building中没有名为building的属性的getter方法。这通常是因为在Mybatis的映射文件中使用了错误的属性名或者属性名拼写错误。需要检查映射文件中是否正确地引用了类中的属性名,并且属性名是否正确拼写。如果映射文件中的属性名和类中的属性名一致,那么需要检查类中是否确实存在名为building的属性,并且是否有对应的getter方法。如果以上都没有问题,那么可能是Mybatis的缓存问题,可以尝试清除缓存后再次运行程序。
相关问题
There is no getter for property named 'board' in 'class com.bitejiuye.forum.model.Article'
Hi, it seems like you are encountering an issue with a missing getter for a property named 'board' in the 'Article' class. To resolve this issue, you need to add a getter method for the 'board' property in the 'Article' class. Here's an example of how you can do it in Java:
```java
public class Article {
private String board;
public String getBoard() {
return board;
}
public void setBoard(String board) {
this.board = board;
}
// other properties and methods of the Article class
}
```
By adding the `getBoard()` method, you will be able to retrieve the value of the 'board' property. Hope this helps! Let me know if you have any further questions.
There is no getter for property named 'depto' in 'class com.example.demo.mybatis.Emp
"There is no getter for property named 'depto' in 'class com.example.demo.mybatis.Emp'这个错误是由于在类com.example.demo.mybatis.Emp中没有名为'depto'的属性对应的getter方法造成的。getter方法用于获取类的属性值,而在这个类中缺少了'depto'属性的getter方法。为了解决这个问题,你需要为类'com.example.demo.mybatis.Emp'中的属性'depto'添加一个对应的getter方法。
阅读全文