February 2017
Intermediate to advanced
1023 pages
24h 11m
English
The web application context configuration file (WebApplicationContextConfig.java) is nothing but a simple Java-based Spring bean configuration class. Spring will create beans (objects) for every bean definition mentioned in this class during the boot up of our application. If you open this web application context configuration file, you will find the following annotations on top of the class definition:
@Configuration: This indicates that a class declares one or more @Bean methods@EnableWebMvc: Adding this annotation to an @Configuration class imports some special Spring MVC configuration@ComponentScan: This specifies the base packages to scan for annotated components (beans)The first annotation ...
Read now
Unlock full access