Below is the error that it is not able to find setter for private Data instance. Can this member variable have getters and setters?
public class Employee {
private int empId;
private String name;
private Data instance; —— class instance
<bean id="testid" class=“com.UpdateRecords"></bean>
<util:list id=“testList" value-type="ServiceBase">
<bean id=“service" class=“ServiceImpl">
<property name="instance" ref="testid"/>
</bean>
</util:list>
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'instance' of bean class
Bean property 'instance' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?