Affects: 6.1.11


I checked #32379 and relevant issue #32426, so I tested it in Spring Boot 3.3.2, yet it seems it is still not working. The error mesage goes like this:

Invalid property 'schemaFields[0]' of bean class [uno.fastcampus.testdata.dto.request.TableSchemaRequest]: Illegal attempt to get property 'schemaFields' threw exception

This appears exactly to be the same message when I use POJO class but without setter as the handler method argument. The tested code looks like this:

@PostMapping(path = "/table-schema", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
public String createTableSchema(
        TableSchemaRequest tableSchemaRequest,
        RedirectAttributes redirectAttrs
) {

    return "redirect:table-schema";
}
// This code works. If I remove setter or turn the class to record, it fails.
@Data
public class TableSchemaRequest {
    private String schemaName;
    private String userId;
    private List<SchemaFieldRequest> schemaFields;
}

So in spite of #32426, it is still not possible to use unmodifiable nested objects as the hander method argument. Is it normal and intended behavior? or is it a bug?

Comment From: simonbasle

@djkeh please note that he issue you are referencing has been fixed in the 6.2.0-M5 milestone, so this is not supported in the 6.1.x branch of Spring Framework. Would you be able to try it out with the latest milestone of 6.2 ?

Comment From: djkeh

Oh, my. I missed the milestone number. I tried again on spring boot 3.4.0-SNAPSHOT, and it works beautifully as intended. I'm closing the issue. Thank you!