I have jdbc property files which I take from external configuration web-service In spring boot in order to set mysql props it\'s easy as adding those to application.properti
This is how you can set properties during startup if you are running spring boot application.
The easiest way is to set the properties before you even started an app.
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication application = new SpringApplication(Application.class);
ConfigurableEnvironment env = new ConfigurableEnvironment();
env.setActiveProfiles("whatever");
Properties properties = new Properties();
properties.put("server.port", 9999);
env.getPropertySources()
.addFirst(new PropertiesPropertySource("initProps", properties));
application.setEnvironment(env);
application.run(args);
}
}