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

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

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