Skip to content

Documentation for nested configuration properties in a native image uses @NestedConfigurationProperty too widely #33239

@wilkinsona

Description

@wilkinsona

The documentation example looks like this:

@ConfigurationProperties(prefix = "my.properties") public class MyProperties { private String name; @NestedConfigurationProperty private Nested nested = new Nested(); // getters / setters... public static class Nested { private int number; // getters / setters... } }

In this case, @NestedConfigurationProperty isn't required as Nested is already nested within MyProperties. It would be required if the code were structure like this:

@ConfigurationProperties(prefix = "my.properties") public class MyProperties { private String name; @NestedConfigurationProperty private Nested nested = new Nested(); // getters / setters... } public class Nested { private int number; // getters / setters... }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions