3

I'm running spring application (version 4.3.3) and trying to refresh application context beans including profiles changes.

After changing spring.profiles.active property (at runtime) and calling refresh method on application context, beans defined within profiles are not getting refreshed. After changing property in the configuration file followed by application restart everything is correct.

How can I refresh the context respecting profile change?

Andremoniy
  • 34,031
  • 20
  • 135
  • 241
luke
  • 3,531
  • 1
  • 26
  • 46
  • 1
    I understand what you are trying to do. Some sample code will definitely help in fixing it. Can you add some sample code? – yaswanth Sep 01 '17 at 10:27
  • What do you mean by *"beans defined within profiles are not getting refreshed"*? Do you want beans from **all** profiles being refreshed or only within current active profile? – Andremoniy Sep 01 '17 at 10:28

0 Answers0