When we define profile for any component in spring, we declare it as
@Profile(value=\"Prod\"). But i want to give that value from properties file.
Is it possibl
An alternative would be when creating the ApplicationContext:
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(ConfigClass.class);
String profile = aplicationContext.getEnvironemnt().getRequiredProperty("profile");
applicationContext.getEnvironment().setActiveProfiles(profile);