spring: application: name: gateway cloud: nacos: config: enabled: true encode: UTF-8 server-addr: nacos-0.nacos-headless.default.svc.cluster.local:8848 discovery: enabled: true server-addr: nacos-0.nacos-headless.default.svc.cluster.local:8848
断点调式springboot的代码,查看bootstrap.yml是否加载
ApplicationArguments applicationArguments = new DefaultApplicationArguments(args); ConfigurableEnvironment environment = this.prepareEnvironment(listeners, bootstrapContext, applicationArguments); this.configureIgnoreBeanInfo(environment);
需要引入的依赖
org.springframework.cloud spring-cloud-starter-bootstrap 3.1.1