All language subtitles for 016 Qualifiers - Coding - Part 2_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

-: Now, let's just zoom out

for a second and let's run our application.

We see that um

we have a problem, right?

Things didn't work out.

It said application failed to start.

And if we can kind of expand our window here

for a bit and just scroll

through the log messages here.

Parameter zero of the constructor

required a single bean

but three were found.

Hmm, three.

Okay. Baseball,

Cricket, Tennis.

Hey, what about our track coach?

That's strange.

I, I thought, thought we had four.

It's a lot of, um

code that I wrote back there and

um only three.

Hmm.

What's up with that?

Let's take a look.

All right, so we have our baseball coach

we have our tennis coach,

we have our track

Oh, got it.

I forgot to add the component annotation here.

So remember the component annotation marks the class

as a spring bean

since it wasn't marked Spring

Couldn't find it.

Ah, got it.

Okay, cool.

Nice little learning exercise there.

All right

so this looks better now

uh, let's run our app one more time

and see how it works out.

Okay, uh

Application, uh

failed to start

uh, because of our parameter

of the constructor, but four were found.

And so basically we kind of broke it the way we

plan to break it, right?

We plan to break it

with four coach implementations, not three.

So anyway, it, it's broken as desired

here at the bottom to give us some actions that we

could possibly make use of

consider doing this stuff.

And it says, Hey, one of the options is making use

of qualifier annotation to identify the bean

that should be consumed.

Okay, great.

Well thanks for that hint

Let's go ahead and, uh

apply that and uh let's implement that hint.

I'll move into our demo controller here.

Expand the window for a second and zoom in.

And in my demo controller

I'll make use of that qualifier annotation.

So I'll specify the bean ID that I want

and I'll specify the bean ID of baseball coach.

So I'll use the same name as the class

except for the first character is lowercase.

So I'm being super specific saying

Use this implementation

of the coach interface.

Okay, great.

So now we can go ahead and run our application

and, uh see if we have any success

and great, so the application started successfully

All right, so that's good.

So we kind of resolved the whole ambiguity issue

and I can go over to my browser

localhost8080/dailyworkout

and I should get a baseball workout.

Great. So it says,

Hey, spend 30 minutes in batting practice.

And that's coming from our baseball coach implementation.

I like it.

This is really good.

And now let's swing back over and let's kind of

just change this up a bit, uh

based on some configuration here.

So instead of baseball coach,

I'd like to modify to make use

of Track Coach

and it should reload the new version

for me out there

and just do a reload on the browser over here

and run a hard 5k.

Great. I love it.

I love it.

So this is really good.

And then just to kind of set everything back to what we

what we originally had

we'll make use of this Cricket coach

as part of the qualifier here

and it makes sure that we actually load the

Cricket Coach implementation

practice our fast bowling

Awesome. So as you can see here

using a spring object factory spring container

we can actually configure how we want to use a given bean

and how we can inject a given bean based

on the configuration.

So this is really good.

I like to say good job my friend.

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