I am using component scan to scan all the Controller,Service and DAO classes. If I put my Services and DAO interfaces on the same package with the implementer, would this cause the component scan process slower (Would it be like two times slower) ? Does it scan the subpackages as well ?
Share
Yes, it will be slower. However you should not consider this as a factor when designing your package layout. Let the architecture drive placement of classes, not some arbitrary framework requirements and peculiarities.
Also you can filter out some classes/patterns if your application is really huge and you want to cut down the bootstrap time (see 4.10.3 Using filters to customize scanning):
And yes, it does scan subpackages.