Я обновляю приложение до Spring Boot 2.1.3 (с версии 1.5.x), и у меня возникла проблема во время запуска.Нижеприведенный блок не может быть правильно привязан:
spring:
zipkin:
enabled: true
base-url: http://myZipkinServer
sender:
type: web
Я получаю эту ошибку:
***************************
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
Немного до того, как я получаю журнал WARN, объявляющий о проблеме:
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
Я пытаюсь следовать в отладке, и в итоге я довольно глубоко разбираюсь во внутренностях Spring Boot в org.springframework.boot.context.properties.bind.Binder
.У меня есть похожее приложение с более или менее той же версией, для которой оно работает просто отлично.Я пытаюсь найти разницу, сравнить потоки выполнения, но не вижу ничего очевидного.
В IntelliJ я получаю автозаполнение, поэтому я знаю, что мой yaml отформатирован правильно: предложено значение "web"для меня.
Есть идеи, как исследовать этот тип проблемы?