0

I have a spring file config1.xml that has beans with no explicitly defined profile. I also have another file config2.xml with two bean profiles (profileA and profileB). If I import the latter one into the former and activate profileA at runtime, would the beans in config1.xml be activated? If not, is there a way to do this without replicating the code for config1.xml?

ishan3243
  • 1,870
  • 4
  • 30
  • 49

1 Answers1

1

Yes, they will be activated. By default your beans have no profile and are loaded into the container. Only if you specify profiles for the beans explicitly, they will be bypassed unless one or more of the specified profiles are active.

Vladislav Lezhnin
  • 837
  • 1
  • 7
  • 17