I have the following properties defined in application.properties
file.
sample.db.serverName=10.10.10.10
sample.db.serverPort=1234
sample.db.databaseName=sampleDb
Now I use the DataSourceBuilder, but I need to build the url with all the available information since it has only url parameter.
I am not sure how to read the properties into a POJO and get the handle in the DataSource class
public DataSource dataSource()
{
//handle for POJO
//StringBuilder to build the url
return DataSourceBuilder.create.url(str.toString()).build();
}
P.S : I referred this link, but it is different from my issue.