yaml没有写错,可以读取到扩展配置和公共配置,读取不到自己的配置,无报错
spring:
application:
name: system-api
profiles:
active: dev
cloud:
nacos:
server-addr: 192.168.101.65:8848
discovery:
namespace: mydev
group: xuecheng-plus-project
config:
namespace: mydev
group: xuecheng-plus-project
file-extension: yaml
refresh-enabled: true
extension-configs:
- data-id: system-service-${spring.profiles.active}.yaml
group: xuecheng-plus-project
refresh: true
shared-configs:
- data-id: swagger-${spring.profiles.active}.yaml
group: xuecheng-plus-common
refresh: true
- data-id: logging-${spring.profiles.active}.yaml
group: xuecheng-plus-common
refresh: true
原因:配置扩展配置需要优先加载扩展配置,将优先加载自己解决
prefix: ${spring.application.name}