October 2017
Intermediate to advanced
396 pages
10h 2m
English
The following minimum configuration is required to search beans using component scanning in a Spring application:
package com.packt.patterninspring.chapter4.bankapp.config;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan
public class AppConfig {
}
The AppConfig class defines a Spring wiring configuration class same as the Java-based Spring configuration in the previous section. There is one thing to be observed here--the AppConfig file has one more @ComponentScan, as earlier it had only the @Configuration annotation. The configuration file AppConfig is annotated with @ComponentScan to enable component ...
Read now
Unlock full access