Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Instructor: Alrighty. So diving into our IDE,
we'll take care of our normal housekeeping work.
And then I'll do a copy paste here on this directory.
08-bean-lifecycle-methods.
And I'll rename it as
09-Java-config-bean.
And then I'll open this project here in IntelliJ.
I'll just do a rebuild on the project
and I wanna remove the code
for @PostConstruct and @PreDestroy
cause we don't really need it for these examples here.
So I'll just kind of clean it up a bit.
I'll just move down here into my cricket coach.
Expand my window here for a second,
and then I'll remove the code here
for @PostConstruct and @PreDestroy.
And now what I'll do is I'll create
this new class call SwimCoach.
I'll expand my window here for a second.
This SwimCoach will implement the coach interface.
And then our coach here says,
swim a thousand meters as a warmup.
Oh my.
And then we'll also create a constructor here
just for diagnostics,
just to see that that this given class is being created.
So I just assist our print line and constructor
and I simply print out the class name.
And then notice here
I'm not using a component annotation here on purpose.
Now let's go ahead and move into our demo controller
and I'll inject our SwimCoach
and I'll just clean the code up just a bit there.
And let's go ahead and run our application.
And it's expected this will kind of crash and fail, right?
It says it failed to start.
The parameter of zero of the constructor
could not be found
and the injection point
with the following annotation qualifier SwimCoach.
Okay? So it couldn't find a swim coach,
and that's expected because we really
haven't done any special annotations
on that SwimCoach class.
We can't find a swim coach
because it's not annotated with component.
For this example, we can use an alternate solution.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.