January 2018
Intermediate to advanced
414 pages
10h 29m
English
The component scan, while scanning all our packages, needs to understand if any of the classes it found should be added to the spring context as a bean, in order to know which classes need to be added, it will check if the class is annotated with the annotation @Component.
To visualize this, we can just view the source code of the @Controller annotation:
@Target({ElementType.TYPE})@Retention(RetentionPolicy.RUNTIME)@Documented@Componentpublic @interface Controller { String value() default "";}
The @Controller annotation uses the @Component annotation, so the component ...
Read now
Unlock full access