java - Spring component scan annotation and meta data -


i'm studying spring application, more particularly componentscan annotation scans java packages find classes annotated @component.

i wondering if spring componentscan annotation stores related components found in other packages inside of meta-datas of main class (where have static void main method?)

is place framework stores these informations?

<context:component-scan base-package="com.mycompany.package" />

tells spring should on com.mycompany.package , find classes annotated following (not @component ):

@controller  @repository @service @component  

then spring register these classes bean factory.

the spring ioc container consumes form of configuration metadata; configuration metadata represents how application developer tell spring container instantiate, configure, , assemble objects in application.

configuration metada either xml configuration or java classes annotated @configuration that's spring stores config informations.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -