All language subtitles for 012 Setter Injection - 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
vi Vietnamese Download
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Instructor: Let's go ahead and take care

of our normal housekeeping;

stopping all apps and closing all windows.

And I'll move in here into my file system

into my dev-spring-boot directory.

And into my O2 spring boot core.

And then I'll copy paste our O2 component

scanning directory here and I'll simply rename it

and give it a new name.

And I'll call it 03 setter-injection.

Now go ahead and open up this project in IntelliJ.

And what I'd like to do first is do a rebuild

on the project.

This'll help with auto reloading of spring boot dev tools.

And step one will create the setter method

in our class for injections.

And step two will configure the dependency

with the Autowired annotation.

Let's go ahead and move into our demo controller.

I'll expand my window for a second.

And what I wanna do is delete some of the previous code.

So where we had our constructor injection

I wanna delete this code

because now we're gonna make use of setter injection.

I'll set up Autowired annotation

and I'll create this setter method setCoach

and then I make the appropriate assignments inside

of this method.

Okay, so we have the basic things

in place here for setter injection for our demo controller.

And now let me swing over to my spring boot application.

I'm gonna delete the previous code I had

for all of the scanned based packages.

Just kind of get rid of it for right now.

We already have backups of it

in some of the other directories.

And great so that's all cleaned up now.

Now let's go ahead and run our application.

And our application is up and running.

Just swing over to our browser and we go

to our local hosts 8080/dailyworkout.

And our app's gonna work the same.

We're gonna get the output here

for this cricket coach practice fast bowling for 15 minutes.

So we know that our application is actually

performing the setter injection at this point.

Now what I'd like to do is move in here

and just change this method real quick

just to make the text a little bit different.

Just do a quick save on it should reload for us.

And then swinging back over into our browser reloading

we should see the new output.

So that's our recent update that we have here.

Okay, good.

And now what I'd like to do

in our demo controller is actually make a modification.

So instead of using a traditional setter method,

I want to just give it any method name here.

So instead of set coach, I'll give any method name

I'll call it, I don't know, doSomeStuff.

You can give whatever name you'd like here.

The fact that this method is annotated

with the auto wired annotation

then spring will use this for dependency injection.

Alrighty, so if we save that accordingly

come back over here.

Reload. And our app works just fine.

So we're getting the message.

So we know that our app is working

with injection, based on any method name that we provide.

And again, because of that auto wired annotation.

Just do a quick little update on the method here,

and okay, great.

So we're getting the latest and greatest here.

So this part is working out as desired.

Now what I'd like to do is kind of just swing back

and just put it back to the traditional set of methods

just to make it straightforward

and easy to read and understandable.

Instead of do some stuff, I'll call it set coach

just to, yeah, that's exactly what we're doing,

we're setting a coach

and great.

So that's in place. We're good to go.

We're all set up.

So that's a quick example there

of using setter injection with spring.

Good job.

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