Nacos无法读取配置中心数据

一、原因分析

       SpringCloud 2.4版本之后不再优先读取bootstrap文件,导致bootstrap不起作用

二、解决办法

       需要在pom.xml文件中引入如下依赖后,就可以正常读取bootstrap.yml配置文件了

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
原文地址:https://www.cnblogs.com/giswhw/p/15215990.html