java - Spring @Autowired detection -


if have class uses spring bean, (will wired via @autowired). noticed not class injected needs @component class uses (inject it). why that? should not spring inject wherever @autowired is? without having use @component injector class?

spring processes , manages classes marked 1 of stereotype annotations @component, @controller, @repository, @service.

it not scan of classes (that make startup slow).

if class not managed spring not process of annotation inside particular class.


Comments

Popular posts from this blog

Sass watch command compiles .scss files before full sftp upload -

filehandler - java open files not cleaned, even when the process is killed -

gridview - Yii2 DataPorivider $totalSum for a column -