Transition from XML to Annotations, Stereotypes & Java Config
In Week 2, we learned to configure the Spring IoC Container by declaring beans in XML files (applicationContext.xml), explicitly defining their dependencies, and managing their scopes and lifecycle methods with init-method and destroy-method attributes.
Advanced Injection, Value Injection & SpEL (Spring Expression Language)
In the previous session, we learned to configure beans using stereotype annotations (@Component, @Service, @Repository), manage their lifecycle with @PostConstruct and @PreDestroy, and replace XML files with @Configuration and @Bean classes.
Presentation: Annotations, JavaConfig & SpEL
In this interactive presentation deck, we explore the transition from XML to Annotations, Stereotypes, and Java Configuration in Spring Framework, resolving dependency ambiguities with @Qualifier and @Primary, reading external properties with @Value("${...}"), and dynamic expression evaluation using Spring Expression Language (SpEL #{...}).