My controller My repository My Entity file My Html File Error while running 1/3 Error page cont. 2/3 Error page cont. 3/3
I am a beginner self learning through videos and courses, so please help me with it.
CodePudding user response:
Your Employee
entity is missing getters so you can't access the private fields. Thymeleaf calls the getters under the hood when you access obj.field
ie it is translated into obj.getField()
. Solution: add getters to your entity. Example for the name field:
public String getName() {
return this.name;
}