The difference between dependency injection and auto-notification

  • Can I find out what is the difference between dependency injection and auto-pause? Regardless of whether auto-authorization is a dependency other than injection?
  • What is the best way to autowiring (XML based or annotation)?
+4
source share
1 answer

Short answer: Injection Dependency is a design pattern, and @autowired is a mechanism for its implementation.

DI , , , (, ), - - , setter. autwire, . Spring , , setter, .

2, . XML . , .

+5

Source: https://habr.com/ru/post/1621515/


All Articles