nacos-group / nacos-spring-project

Nacos ECO Project for Spring Framework
https://nacos.io/
Apache License 2.0
756 stars 311 forks source link

@NacosConfigurationProperties cannot get the value in the extConfig configuration file, but can only get the value in the shared configuration #292

Open andotorg opened 2 years ago

andotorg commented 2 years ago

Issue Description

Type: feature request

@NacosConfigurationProperties cannot get the value in the extConfig configuration file, but can only get the value in the shared configuration I hope it can get the value in extConfig

Describe what happened (or what feature you want)

@NacosConfigurationProperties cannot get the value in the extConfig configuration file, but can only get the value in the shared configuration

Describe what you expected to happen

I hope @NacosConfigurationProperties can get the value in extConfig

How to reproduce it (as minimally and precisely as possible)

  1. shareConfig and extConfig, extConfig have one properties : you.name=lucas ,
  2. use @NacosConfigurationProperties
    @Data
    @Component
    @NacosConfigurationProperties(
        groupId = "${nacos.config.group}",
        dataId = "${nacos.config.data-id}",
        prefix = "you",
        type = ConfigType.PROPERTIES,
        autoRefreshed = true)
    public class Name {
    private String name;
    }
  3. Name cannot get the value of the corresponding Nacos

Tell us your environment

dev local

Anything else we need to know?

No

andotorg commented 2 years ago

Can this feature be supported