报错信息是:
1.取不到配置:在这里插入图片描述

2.或者:Caused by: com.alibaba.nacos.api.exception.NacosException: endpoint is blank
在这里插入图片描述

bootstrap.yml (bootstrap.properties) 与application.yml(application.properties)执行顺序
bootstrap.yml (bootstrap.properties)︰用来在程序引导时执行,应用于更加早期配置信息读取,如可以使用来配置application.yml中使用到参数等
application.yml (application.properties):应用程序特有配置信息,可以用来配置后续各个模块中需使用的公共参数等。
因此bootstrap.yml先于application.yml 加载

 		<dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-bootstrap</artifactId>
            <version>3.1.0</version>
        </dependency>

请添加图片描述

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐