RuntimeException: MemberAccess implementation must be provided

自作多情 提交于 2019-12-02 09:52:22

As @Ahmet stated in the comments, I do not need any additional OGNL dependencies. Would've surprised me anyway. The problem was, that my model class looked like this:

public class Customer {
    public String addressee;
    public String street;
    public String postalCode;
    public String city;
    public String country;
}

I was not aware, that there are explicit public getter methods required. I had to change the model to

public class Customer {
    private String addressee;
    private String street;
    private String postalCode;
    private String city;
    private String country;

    public String getAddressee() {
        return addressee;
    }

    public void setAddressee(String addressee) {
        this.addressee = addressee;
    }

    public String getPostalCode() {
        return postalCode;
    }

    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }
}

In order to make it work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!