Skip to content

Wrapper types are not displayed in actuator env endpoint #24307

Closed
@plilja

Description

@plilja

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.

Metadata

Metadata

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions