All language subtitles for 014 Qualifiers - Overview_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Instructor: In this video will cover Annotation

Autowiring and Qualifiers.

For auto wiring,

we're injecting a coach implementation.

So, Spring will scan for components,

check to see if anyone implements a given coach interface.

If so, let's inject them.

But if we have multiple implementations, which one,

like what algorithm will Spring use to determine

which coach that it should implement? Hmm.

So, here's a diagram here

of our multiple coach implementations.

So, we have coach, cricket coach,

baseball coach, track coach, tennis coach, et cetera.

And then, we have the actual source code

for these implementations.

So, we have our cricket coach, baseball, track and tennis.

All implement the coach interface.

So, when we ask for a coach implementation,

which one will Spring pick?

Well, we have a little problem.

So, this is the error message that you'll actually

encounter when you run your application.

Spring will say there's a parameter zero of the constructor

and the controller required a single bean,

but four were found.

Okay so, I need a coach,

but there's too many of them out here.

And at this point, Spring will not start up.

The application will not start

because there's too much ambiguity.

Spring can't figure out which one you want.

So, one solution here is to be specific

and that's by making use of the qualifier annotation.

And so, here's our coding here for our demo controller.

And everything looks the same except

for this one new entry here for qualifier.

So, here we give qualifier

and then we specify the bean ID of cricket coach.

Now the bean ID has the same name

as the class except for the first character as lowercase.

All right. So, that's how we come

up with cricket coach here, starting with lower case.

And this will actually resolve the issue

because now we're being very specific.

We're saying, hey, use cricket coach

as the injection for this given item.

And there's other bean IDs out there that we could use

such as baseball coach, track coach, or tennis coach.

But in this scenario here,

we're making use of the cricket coach.

Now that's for constructor injection.

For setter injection, you can do a similar thing.

You can also use the qualifier annotation.

And then, here's our code examples,

our normal setter method set coach

and then we specify qualifier annotation

and then give cricket coach.

Again, the bean ID is the same name as the class

except for the first character is lowercase.

All righty, this looks pretty good.

Let's go ahead and move into our (indistinct)

and let's write the code.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.