curena
9/22/2017 - 4:20 PM

Spring use environment variable in @Value clause.

Spring use environment variable in @Value clause.

@Bean
public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() {
    return new PropertySourcesPlaceholderConfigurer();
}

@Value("${RESOURCE_URL}")
private String url;