All language subtitles for 018 Primary - Coding_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

-: Let's go ahead and take care

of our normal housekeeping work.

We'll stop all of our apps and close all of our windows.

And I'll just do a little copy-paste here

in this 04-qualifiers directory,

and I'll rename it as 05-primary.

And I'll go ahead and open this up in IntelliJ.

I'll just do a rebuild on the project.

I'll just do a quick cleanup here.

There's an old folder that we have,

our util folder.

We're not using that anymore.

I'll just delete that.

And now I'll go ahead and remove the code

for the qualifier annotation.

I'll move into this class here, demo controller.

And we had the qualifier annotation.

I'll just remove that piece of code here,

and this should fail, right,

because we have multiple implementations out here

and it's not sure which one it's gonna use.

Let's just go ahead and run it real quick just to verify.

All right, so we see the issue here.

Application failed to start, multiple implementations,

not sure which one that it should use.

We've seen all this stuff before.

Down in the action section, this is where it gave you

some hints or tips on how to resolve this issue.

All the way over to the right,

we already saw the example here of using

the qualifier annotation.

We implemented that already,

but notice here they also mentioned the primary annotation.

Hmm. Okay. So let's mark one of the beans as primary.

All right. Let's try it out.

I'll move into my TrackCoach here and expand my window,

zoom in a bit,

and I'll use the primary annotation here.

Basically what I'm saying here is since there are

multiple implementations,

then make the TrackCoach as the primary coach.

In our demo controller,

one thing to notice here,

since we're using Primary and demo controller

there's no need to use Qualifier

because we have a Primary coach.

In this example, we set it up on the TrackCoach

such to resolve any issues or questions

that Spring may have as far as which one to use.

Make use of the Primary one.

Let's go ahead and run our application,

and success. The application starts successfully.

So there's no problem,

there's no errors.

Spring knows which one of the coaches

it should use because we're making use

of the primary annotation.

Swing over into my web browser.

Go to local host 8080/daily workout,

and I should get a track workout.

Excellent.

Run a hard 5K because here we're making use

of that TrackCoach because it's primary.

Alrighty, swing back in,

and let's try and break it on purpose.

I love to do this stuff. This is always fun.

So let's go ahead and add multiple primary components

and let's see what happens.

We know that TrackCoach is already primary.

Let's go ahead and make CricketCoach primary.

All right? We're trying to add multiple primaries,

and, hey, what will Spring do?

Alrighty, so that's in place. Save that.

Your app should reload automatically,

and it's gonna reload and it's gonna fail on the reload.

So if we scroll up a bit

and take a look at the error message,

it says, "Unsatisfied dependency exception."

Okay?

In all this ugly stacked tray stuff,

they're creating bean with demo controller.

Okay?

Blah, blah, blah.

And unsatisfied dependency.

Okay?

So no qualifying bean of type coach available.

And, oh, look at this.

More than one primary bean found

among the candidates.

All right?

So Spring figured us out.

It says, "Hey, you have too many primaries out here.

You can't do that."

And so that's the main issue, that's the root cause.

Okay? And, of course, we can resolve that

by simply having a single primary component.

And so I'll just do that here by just going to CricketCoach,

removing that primary annotation, saving,

and it should reload and reload successfully.

Okay, great.

So our app is up and running and everything's up.

I can go and access that link,

and I should get the track workout on a hard 5K.

Okay, great.

All right, so this is a good example

of handling the issue of multiple implementations

by making use of the primary annotation.

And just swinging back into our demo controller here,

we see that there's no need to use Qualifier

because we actually have a primary coach,

and by swinging over to TrackCoach here,

you can see that this given TrackCoach

is marked as primary.

All right.

So good job, good job.

I'm very happy.

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