I am upgrading an application to Spring Boot 2.1.3 (from 1.5.x), and I am facing an issue at startup time. Below block can't be bound properly :
spring:
zipkin:
enabled: true
base-url: http://myZipkinServer
sender:
type: web
I am getting this error :
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under 'spring.zipkin.sender.type' to org.springframework.cloud.sleuth.zipkin2.sender.ZipkinSenderProperties$SenderType:
Property: spring.zipkin.sender.type
Value: web
Origin: class path resource [application.yml]:68:13
Reason: 0
Action:
Update your application's configuration
A bit before I am getting a WARN log announcing the issue :
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.zipkin.sender-org.springframework.cloud.sleuth.zipkin2.sender.ZipkinSenderProperties': Could not bind properties to 'ZipkinSenderProperties' : prefix=spring.zipkin.sender, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.zipkin.sender.type' to org.springframework.cloud.sleuth.zipkin2.sender.ZipkinSenderProperties$SenderType
I am trying to follow in debug, and I end up pretty deep in Spring Boot internals
in org.springframework.boot.context.properties.bind.Binder
.
I have a similar app with more or less same version for which it works just fine. I am trying to find a difference, compare the execution flows, but not finding anything obvious.
In IntelliJ, I get the auto-completion so I know my yaml is formatted properly : the "web" value is proposed to me.
Any idea of how to investigate this kind of issue ?