Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Refine implicit @ConfigurationProperties handling with records #1491

Closed
sdeleuze opened this issue Feb 11, 2022 · 0 comments
Closed

Refine implicit @ConfigurationProperties handling with records #1491

sdeleuze opened this issue Feb 11, 2022 · 0 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@sdeleuze
Copy link
Contributor

As reported here this works:

@ConfigurationProperties("servers")
@ConstructorBinding
public record ServersConfiguration(ServerConfiguration server) {
  public record ServerConfiguration(int port) {
    public ServerConfiguration{
      System.out.println("Port: " + port);
    }
  }
}

While this does not work:

@ConfigurationProperties("servers")
public record ServersConfiguration(ServerConfiguration server) {
  public record ServerConfiguration(int port) {
    public ServerConfiguration{
      System.out.println("Port: " + port);
    }
  }
}

See related Boot commit.

@sdeleuze sdeleuze added the type: bug A general bug label Feb 11, 2022
@sdeleuze sdeleuze added this to the 0.11.3 milestone Feb 11, 2022
@sdeleuze sdeleuze self-assigned this Feb 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A general bug
Development

No branches or pull requests

1 participant