欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Binding to target org.springframework.boot.context.properties.bind.BindException: Failed to bind pro

程序员文章站 2024-03-14 08:47:16
...

前言

在springcloud Gateway进行Demo练习时报错,错误信息如下:


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-05-21 16:35:37.870 ERROR 16792 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Binding to target org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.cloud.gateway' to org.springframework.cloud.gateway.config.GatewayProperties failed:

    Property: spring.cloud.gateway.routes[1].uri
    Value: null
    Reason: 不能为null

    Property: spring.cloud.gateway.routes[0].uri
    Value: null
    Reason: 不能为null


Action:

Update your application's configuration

Disconnected from the target VM, address: '127.0.0.1:59483', transport: 'socket'


解决办法

Binding to target org.springframework.boot.context.properties.bind.BindException: Failed to bind pro
改成:
Binding to target org.springframework.boot.context.properties.bind.BindException: Failed to bind pro
启动成功:
Binding to target org.springframework.boot.context.properties.bind.BindException: Failed to bind pro

相关标签: 日常bug