Last active
April 23, 2017 21:17
-
-
Save andersonkxiass/751d623e4a36be71d1fd36ed1e0662e6 to your computer and use it in GitHub Desktop.
Database configs
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
@Configuration | |
@PropertySource({ "classpath:application.properties" }) | |
public class DatabaseConfig { | |
@Bean | |
@Primary | |
@ConfigurationProperties(prefix = "spring.datasource") | |
public DataSource dataSource() { | |
return DataSourceBuilder.create().build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment