ProtoBuf generated java classes does not work correctly with Spring Expression Language

29 views Asked by At

I have folowing proto files

message Department {
 string deptName =1;
}
message Person {
 string name =1;
Department dept=2;
}

When the java classes getting created you can see the field names will be something like this.

name_ and dept_

but protoBuf provides the getName() and getDept() methods from that we can access the values of Person class.

But somehow when I try to filter these using Spring Expression Language (SpEL) I am getting below exceptions.

The error message "EL1008E: Property or field 'dept_' cannot be found on object of type 'com.test.Person' - maybe not public or not valid?" is related to Spring Expression Language (SpEL) and indicates that the specified property or field (dept_ in this case) cannot be found on the object of type com.test.Person.

0

There are 0 answers