-
Book Overview & Buying
-
Table Of Contents
Spring Data
By :
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:
The @Configuration annotation is used to identify the class as an application context configuration class.
The @ComponentScan annotation is used to configure the base package of our controllers.
The @EnableWebMvc annotation is used to enable the Spring MVC.
The values of the configuration parameters are fetched from a property file that is imported by using the @PropertySource annotation. The Environment interface is used to access the property values stored in this file.
The redisConnectionFactory() method is used to configure the Redis connection factory bean. The implementation of this method depends on the used Redis connector.
The source code of our application context configuration skeleton class is given as follows...
Change the font size
Change margin width
Change background colour