There are two ways to create a Spring IoC container:
- Bean factory
- Application context
Let's use an application context to create a Spring IoC container. We can have either a Java configuration or an XML configuration for an application context. Let's start with using a Java application configuration.