Spring annotations basic question -
as far understand, main purpose of dependency injection have dependencies separated declaratively, can review , change dependency structure easily...right?
then using dependency annotations spread through out code, aren't going non-centralized system (similar simple new operator), harder tweak?
@autowired
/@inject
annotations declare dependencies on interfaces rather on concrete classes (as in case of new
), still can control implementations should injected controlling beans declared in context. also, these dependencies can overriden manually.
@component
-family annotations can controlled well, since can exclude particular classes component scanning.
Comments
Post a Comment