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

Wrapper types are not displayed in actuator env endpoint #24307

Closed
plilja opened this issue Dec 1, 2020 · 1 comment
Closed

Wrapper types are not displayed in actuator env endpoint #24307

plilja opened this issue Dec 1, 2020 · 1 comment
Assignees
Milestone

Comments

@plilja
Copy link

@plilja plilja commented Dec 1, 2020

We have upgraded on off our projects at work to Spring boot 2.4. It seems like the way properties are serialized under /actuator/env had changed.

For example we used to be able to get the server.port like this:

...
"properties": {
   "local.server.port": {
   "value": 1660
   }
}
...

After upgrading it instead looks like:

...
"properties": {
   "local.server.port": {
   "value": "Complex property type java.lang.Integer"
}

I tracked it to this recent commit:
1a3f810

I think the method stringifyIfNecessary should have branches for all the standard boxed types as well as BigDecimal and BigInteger.

To reproduce you can spin up a standard project from https://start.spring.io/ and include "Spring Web" and "Spring boot actuator" as dependencies and then visit the env endpoint.

@scottfrederick scottfrederick self-assigned this Dec 1, 2020
@philwebb philwebb added this to the 2.4.x milestone Dec 1, 2020
@scottfrederick scottfrederick changed the title Spring-boot 2.4: Boxed types like Integer/Boolean/Double are no longer displayed in env endpoint Wrapper types are not displayed in actuator env endpoint Dec 1, 2020
@scottfrederick scottfrederick modified the milestones: 2.4.x, 2.4.1 Dec 1, 2020
@scottfrederick
Copy link
Contributor

@scottfrederick scottfrederick commented Jan 22, 2021

@soumi1694 The issue is assigned to the milestone 2.4.1, indicating that it was fixed in that version of Spring Boot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants