@Autowired: Difference between revisions
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 6: | Line 6: | ||
* [[Spring Dependency Injection and Inversion of Control Container Concepts#@Autowired|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= | =Overview= | ||
<font color=darkgray>@Autowired can be used to inject [[Spring_Persistence_Concepts#DataSource|DataSources]], ...</font> | <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")