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
1 1
Hey, in this video, 2
2
we're gonna learn how to use components 3
3
in the default bean id. 4
4
Well, so far we've already learned 5
5
how to specify the bean id in the component annotation. 6
6
So with our previous example, 7
7
we had tennis coach 8
8
and we have at component, 9
9
and we give that silly coach. 10
10
That's the bean id that we'll use 11
11
in our application. 12
12
So we can actually remove the actual bean id 13
13
and let Spring generate a default bean id. 14
14
The default bean id is basically the class name 15
15
and they simply make the first letter lowercase. 16
16
As an example, if we are a class of tennis coach 17
17
with a capital t, 18
18
then if we don't specify a bean id, 19
19
the default bean id will be tennis coach 20
20
with a lowercase t. 21
21
Okay, so let's kind of walk through this 22
22
with a code example. 23
23
So notice here I have tennis coach 24
24
and I have at component. 25
25
Note here, I didn't explicitly specify a bean id. 26
26
So again, we have the class name of tennis coach, 27
27
our default bean id will be tennis coach 28
28
with a lowercase t, 29
29
so they'll take the first letter of the class 30
30
and make it lowercase. 31
31
Now let's look at how we could use this in code now. 32
32
In our code to actually retrieve the bean 33
33
from the container, 34
34
I'd say context get bean, 35
35
and I give the default bean id, 36
36
which is tennis coach, 37
37
which starts with a lowercase t, 38
38
and that'll actually give me the bean 39
39
from the Spring container. 40
40
So again, notice here we're using the default bean id 41
41
since our class didn't explicitly specify a bean id. 42
42
And that's pretty much it. 43
43
So what we'll do in the next video 44
44
is we'll actually move into Eclipse 45
45
and we'll actually work through this example, 46
46
and we'll see how we can actually modify our code 47
47
to make use of the default bean id, 48
48
and then also retrieve it from the container. 49
49
So I'll see you in the next video.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.