Spring beans run inside the application context.
The application context is the Spring Advanced Container. Similar to BeanFactory, it can load bean definitions, wire beans together, and distribute beans upon request. In addition, it adds more corporate features, such as the ability to resolve text messages from a properties file and the ability to publish applications for interested event listeners. This container is defined by the org.springframework.context.ApplicationContext interface. https://www.tutorialspoint.com/spring/spring_applicationcontext_container.htm
For each application context, you can have many configuration files, configuration classes, or a combination of both.
You can create an application context with this code:
ApplicationContext context = new FileSystemXmlApplicationContext("Beans.xml");
And we get beans with context.getBean or with @autowired .
There are some cases when you want (or need) to have a context hierarchy. In this case, Spring provides a way to specify the parent context. If you look at this constructor, you will see that it gets the context parent.
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/support/FileSystemXmlApplicationContext.html#FileSystemXmlApplicationContext-org.springframework.context.ApplicationContext-
As you can see, the parent context is the same type of child context, they are both http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/ApplicationContext.html .
The difference is that they are linked through the parent / child relationship. Do not compose (import) relationships.
The most common case when you see this in a Spring MVC application, these applications have 2 contexts, frist is the dispatcher servlet context, and the other is the root context. Here you can see the relationship http://docs.spring.io/spring/docs/3.0.x/spring-framework-reference/html/mvc.html#mvc-servlet
And here you can see an example of the application context hierarchy in Spring boot applications.
https://dzone.com/articles/spring-boot-and-application-context-hierarchy