Skip to content

Instantly share code, notes, and snippets.

@CheolhoJeon
Created April 29, 2020 01:55
Show Gist options
  • Save CheolhoJeon/d0bc71578bea2dc420d9d44605768576 to your computer and use it in GitHub Desktop.
Save CheolhoJeon/d0bc71578bea2dc420d9d44605768576 to your computer and use it in GitHub Desktop.
package config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.io.ClassPathResource;
@Configuration
public class PropertyConfig {
@Bean
public static PropertySourcesPlaceholderConfigurer properties() {
PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer();
configurer.setLocation(new ClassPathResource("db.properties"));
return configurer;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment