I have a use case where i have some classes containing properties and getting initialised at the time of app startup from external source And now i want spring boot auto configured beans like datasource takes properties from these property classes.
example :
@Configuration
public class A {
String url;
String password;
String username:
.
.
.
othere datasource related fields
.
.
.
getters...
setters...
}
Now this bean will get created at startup and get values from external source. How auto configuration of datasource bean (sql server) can take values from this class and how the initialisation of this bean should be forced before that of datasource.