Created
April 29, 2020 01:55
-
-
Save CheolhoJeon/d0bc71578bea2dc420d9d44605768576 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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