Closed robin977 closed 4 years ago
场景: @Configuration @EnableNacosConfig(globalProperties = @NacosProperties(serverAddr ="${nacos.addr:localhost}")) @NacosPropertySources({ @NacosPropertySource(dataId = “datasource”, autoRefreshed = true, groupId = "${nacos.group:DEFAULT_GROUP}") public class NacosConfiguration { } 解析@NacosPropertySource属性值在AbstractNacosPropertySourceBuilder的doBind方法, groupId = NacosUtils.readFromEnvironment(groupId, environment); 在读取属性时,没有将默认值分开
场景: @Configuration @EnableNacosConfig(globalProperties = @NacosProperties(serverAddr ="${nacos.addr:localhost}")) @NacosPropertySources({ @NacosPropertySource(dataId = “datasource”, autoRefreshed = true, groupId = "${nacos.group:DEFAULT_GROUP}") public class NacosConfiguration { } 解析@NacosPropertySource属性值在AbstractNacosPropertySourceBuilder的doBind方法, groupId = NacosUtils.readFromEnvironment(groupId, environment); 在读取属性时,没有将默认值分开