[Relearn Spring] 2.4 IoC – Annotation-Based Configuration

1. For Injection

@Required

@Autowired   — wire by type

@Resource    — wire by name

@Qulifier

2. For Declaration

@Component

@Service

@Repository

@Controller

These annotations will take effect only if <context:component-scan> is used.

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.