Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actuator does not display immutable configuration properties when using @Validated #19219

Closed
noriyuki106 opened this issue Dec 4, 2019 · 0 comments
Labels
type: bug A general bug
Milestone

Comments

@noriyuki106
Copy link

noriyuki106 commented Dec 4, 2019

Spring Boot: 2.2.1.RELEASE
Operating System: Mac OS 10.14.6 (Mojave)
Kotlin 1.3.60

When I added @Validated annotation to an immutable configuration properties class (using @ConstructorBinding), actuator configprops does not display its fields.

For example:

@Validated
@ConfigurationProperties(prefix = "prop.validated")
@ConstructorBinding
data class ValidatedProp(
    val field: String
)

actuator does not display its fields:

"prop.validated-com.example.demo2.ValidatedProp": {
  "prefix": "prop.validated",
  "properties": {}
}

This configuration properties class is correctly initialized and not impacted in my application.

When I remove either @Validated or @ConstructorBinding, actuator seems to display its properties correctly.

Here is my example project:
demo2.zip

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 4, 2019
@mbhave mbhave added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 4, 2019
@mbhave mbhave added this to the 2.2.x milestone Dec 4, 2019
@mbhave mbhave modified the milestones: 2.2.x, 2.2.2 Dec 4, 2019
@mbhave mbhave closed this as completed in 2c4a1f1 Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants