What are the limitations with autowiring?

Technology CommunityCategory: SpringWhat are the limitations with autowiring?
VietMX Staff asked 3 years ago

Limitations of autowiring are:

  • Overriding possibility − You can still specify dependencies using <constructor-arg> and <property> settings which will always override autowiring.
  • Primitive data types − You cannot autowire so-called simple properties such as primitives, Strings, and Classes.
  • Confusing nature − Autowiring is less exact than explicit wiring, so if possible prefer using explicit wiring.