we can use
@Value("${url}")
private String url;
when we have the property url defined inside application.properties file. How to do this binding of properties to @Value annotation when we don’t have an application.properties. We have the properties coming from a server during startup of the app. which is brought like
Properties properties = new Properties();
properties.load(new FileInputStream(System.getProperty("propertiesFile", "config.properties")));
My purpose is to populate the properties like url, username etc coming from external source instead of application.properties