I have three configuration files in spring application.
@Configuration
public class FooConfig { ... }
@Configuration
public class BarConfig { ... }
@Configuration
public class FooBarConfig { ... }
what is the order in which the beans are loaded? can I use a bean
defined in FooConfig
in BarConfig
and vice versa?
EDIT
This works fine as is. But my doubt is whether it works because of chance. There is an ambiguity here since different configuration files are used and the order in which they are resolved is important for proper bean loading.