nacos更新时报错异常排查

事情是这样的,近期公司业务原因,要在一个项目中加入多数据源配置,加就加吧,也不麻烦,可是加完多数据源之后业务没出问题,却发现刷新nacos时,原本可以正常refresh值的,现在出现异常报错,只能通过重启保证重新加载更新过的nacos的值了。那怎么办,自己作的死要自己解决。

  1. 异常报错
  2. 数据源DataSource配置
  3. 问题分析
  4. 问题解决

如果没耐性的,可以直接拉到底部看问题解决吧。


异常报错
2021-04-13 17:02:52.962 [tid:  ][skId:  ] [com.alibaba.nacos.client.Worker.longPolling.fixed-ip_10348-ip_10348-ip_10348] ERROR c.a.n.c.config.impl.CacheData:220 - [fixed-ip_10348-ip_10348-ip_10348] [notify-error] dataId=arthur-payment-test.yml, group=DEFAULT_GROUP, md5=01bf9cdbf9d77212704149639b020844, listener=com.alibaba.cloud.nacos.refresh.NacosContextRefresher$1@1ac9633c tx={
   }
org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.datasource' to javax.sql.DataSource
        at org.springframework.boot.context.properties.bind.Binder.handleBindError(Binder.java:242)
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:218)
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:202)
        at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:185)
        at org.springframework.boot.context.properties.ConfigurationPropertiesBinder.bind(ConfigurationPropertiesBinder.java:78)
        at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:101)
        at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:89)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:414)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1763)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:405)
        at org.springframework.cloud.context.properties.ConfigurationPropertiesRebinder.rebind(ConfigurationPropertiesRebinder.java:102)
        at org.springframework.cloud.context.properties.ConfigurationPropertiesRebinder.rebind(ConfigurationPropertiesRebinder.java:83)
        at org.springframework.cloud.context.properties.ConfigurationPropertiesRebinder.onApplicationEvent(ConfigurationPropertiesRebinder.java:128)
        at org.springframework.cloud.context.properties.ConfigurationPropertiesRebinder.onApplicationEvent(ConfigurationPropertiesRebinder.java:50)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:402)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:359)
        at org.springframework.cloud.context.refresh.ContextRefresher.refreshEnvironment(Cont
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值