Skip to content

Support constructor binding for property nested inside a JavaBean #18894

@mbhave

Description

@mbhave
@ConfigurationProperties("test")
static class JavaBeanNestedConstructorBindingProperties {

  private Nested nested;

  Nested getNested() {
    return this.nested;
  }
  
  public void setNested(Nested nested) {
    this.nested = nested;
  }

  static class Nested {

    private final int age;

    @ConstructorBinding
    private Nested(int age) {
      this.age = age;
    }

    int getAge() {
      return this.age;
    }

  }

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions