configure datasource programmatically in spring boot

In this post, we will learn about configure datasource programmatically in spring boot In below example we are using mysql as database. We are reading database properties from application.properties using @ConfigurationProperties Using DataSourceBuilder In the above snippet spring boot will create datasource with values from application.properties make sure your prefix correct matching text. In this … Continue reading configure datasource programmatically in spring boot