We will use the Java configuration for configuring the application context of our application. The name of our application context configuration class is
ApplicationContext, and its implementation is explained in the following points:
@Configurationannotation is used to identify the class as an application context configuration class.
@ComponentScanannotation is used to configure the base package of our controllers.
@EnableWebMvcannotation is used to enable the Spring MVC.
Environmentinterface is used to access the property values stored in this file.