final NacosPropertySource[] propertySources = new NacosPropertySource[dataIds.length];
propertySources 的长度 是 3
但 for 里会进入 continue 导致 propertySources 里有一个 null
java.lang.NullPointerException: Cannot invoke "org.springframework.core.env.PropertySource.getName()" because "propertySource" is null
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:85)
https://github.com/nacos-group/nacos-spring-boot-project/blob/82caa209b37f785980526b394f3def17bb84458f/nacos-config-spring-boot-autoconfigure/src/main/java/com/alibaba/boot/nacos/config/util/NacosConfigLoader.java#L150
nacos.config.data-ids=a,,b
写错了,多写了个,
final NacosPropertySource[] propertySources = new NacosPropertySource[dataIds.length];
3
for
里会进入continue
导致 propertySources 里有一个null