Bean property is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter? Spring Batch

后端 未结 2 1986
情深已故
情深已故 2020-12-18 12:15

I am developing Spring Batch CompositeItemReader & Writer Example. I developed XML file and able to compile code successfully, but when running mu sample co

2条回答
  •  无人及你
    2020-12-18 12:47

    You declare your class Customer as:

    public class Customer implements Serializable{
        private static final long serialVersionUID = 1L;
    
        private Integer customerNumber;
        private String customerName;
        private String contactLastName;
        private String contactFirstName;
        ....
        // setters and getters
    }
    

    All of your fields are private and you have not yet implemented public getter/setter methods. Do that and your issue will be solved.

提交回复
热议问题