I have a Spring Boot application that will use SQL Server. I want to be able to start application without application.properties and after startup to define url, username and password (at this moment i will write everything to application.properties). For instance i start application and from browser populate form with those parameters. I have tried with DataSourceBuilder class but it happend's too early.
DataSourceBuilder
.create()
.username(username)
.password(password)
.url("jdbc:sqlserver://" + computerName + "\\SQLEXPRESS;DatabaseName=" + dataBaseName)
.driverClassName("com.microsoft.sqlserver.jdbc.SQLServerDriver")
.build();
I want to be able to dynamically change data source after application startup.