Hi am using spring 2.4 version and feign cloud from spring cloud
but i getting stuck that am not able to use some constant value inside @bean method  when i reading from property  file
@Configuration
public class FeignClientConfiguration {
    @Value("${app.basic.auth.username}")
    private static String userName;
    @Value("${app.basic.auth.password}")
    private static String password;
    @Bean
    public BasicAuthRequestInterceptor basicAuthRequestInterceptor() {
        // return new BasicAuthRequestInterceptor("admin", "admin");
        return new BasicAuthRequestInterceptor(userName, password);
    }
}
But i while provides value in like this i will work fine
return new BasicAuthRequestInterceptor("admin", "admin");
Am not sure why this is not working can you please suggest me any way to achieve this
 
     
    