@Autowired: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * Spring Dependency Injection and Inversion of Control Container Concepts") |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=External= | |||
* https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/factory/annotation/Autowired.html | |||
=Internal= | =Internal= | ||
* [[Spring Dependency Injection and Inversion of Control Container Concepts# | * [[Spring Dependency Injection and Inversion of Control Container Concepts#@Autowired|Spring Dependency Injection and Inversion of Control Container Concepts]] | ||
=Dependency= | |||
<syntaxhighlight lang='groovy'> | |||
dependencies { | |||
implementation('org.springframework:spring-beans') | |||
} | |||
</syntaxhighlight> | |||
=Overview= | |||
<font color=darkgray>@Autowired can be used to inject [[Spring_Persistence_Concepts#DataSource|DataSources]], ...</font> | |||
=Autowiring a Bean by Name= | |||
<font color=darkgreen>TODO</font> | |||
<syntaxhighlight lang='java'> | |||
@Autowired | |||
@Qualifier("myBean") | |||
</syntaxhighlight> |
Latest revision as of 21:53, 14 November 2018
External
Internal
Dependency
dependencies {
implementation('org.springframework:spring-beans')
}
Overview
@Autowired can be used to inject DataSources, ...
Autowiring a Bean by Name
TODO
@Autowired
@Qualifier("myBean")