解决Property or field ‘ID‘ cannot be found on object of type ‘com.ch.ehouse.entity.House‘问题

Property or field 'ID' cannot be found on object of type 'com.ch.ehouse.entity.House'
means that the ID variable cannot be found in the House class object.
Why can't I find the ID variable? It must be that the value was not obtained when the getID method was called or the getID method could not be found. So first of all, we know from the sentence that we need to first check whether the variables and methods related to ID in the House class are written correctly. As expected, I was shocked when I saw it. I was careless and wrote getID as getId (as shown in the picture) Insert image description here
. Change it to ID and it will run normally. Searching by pictures is usually a good idea. If it still doesn't work, then check to see if there are any errors in the html file. Generally speaking, this kind of problem should be caused by errors in the back-end code.

Guess you like

Origin blog.csdn.net/qq_45098495/article/details/116016163