spring-boot-admin icon indicating copy to clipboard operation
spring-boot-admin copied to clipboard

Client registration doesn't work when Spring Boot configured to use snake case

Open obourgain opened this issue 10 months ago • 1 comments

Spring Boot Admin Server information

  • Version: Spring Boot Admin server & client 3.4.5

  • Spring Boot version: Spring Boot 3.4

  • Configured Security: basic auth, but not relevant to this issue

  • Webflux or Servlet application: servlet, but not relevant to this issue

Client information

  • Spring Boot versions: Spring Boot 3.4

  • Used discovery mechanism: self registration

  • Webflux or Servlet application: servlet, but not relevant to this issue

Description

When the client app uses the property spring.jackson.property-naming-strategy: SNAKE_CASE, then the registration client will write the body for the registration request using snake case. This can't be deserialized properly by RegistrationDeserializer as it supports only camel case.

I would expect Spring Boot Admin to not rely on the generic MessageConverters facility from Spring but instead configure explicitly the ObjectMapper.

## Reproducer

You can easily reproduce this issue with the test ClientServletApplicationTest by adding "--spring.jackson.property-naming-strategy=SNAKE_CASE" to the application.run(...)

obourgain avatar Mar 31 '25 10:03 obourgain

This bug was introduced by #3930 and is released since 3.4.2, as a workaround 3.4.1 can be used meanwhile

ajacob avatar May 21 '25 10:05 ajacob