0

I was able to get the public variable assigned in my one of configuration class. But after using the annotation @Refreshscope Im getting null value instead of actual. Im getting the value when using the getter but not getting while accessing like

PropConfigs.name

My class is looks like below,

@Configuration
@RefreshScope
@Getter
public class PropConfigs {

    @Value("${config.name}")
    public name;
    
    @Value("${config.salary}")
    public salary;
    
}

The issue is comes only when annoting the class with @RefreshScope for Spring Config Client. Thank u very much for help in advance.

oldMonk
  • 85
  • 1
  • 1
  • 8

0 Answers0