first of all please refer to this tutorial i've been reading.
I've been following that tutorial because it seems much easier to understand than other tutorials and guides over the internet.
So i am having trouble grasping the concept of inner bean here. It was not explicitly indicated on that tutorial (or i must've miss something on spring docus). So do please point me or explain to me the following;
1.) In TextEditor.java, it has a method setSpellChecker(SpellChecker spellChecker), and looking at the final output it displayed 3 messages. Particulalry "Inside setSpellChecker.", How was it displayed where in fact SpellChecker class has no constructor, its a setter method. does this mean upon setting of property spellChecker, setter method was called?
Disclaimer: I am new to spring and even though there is a documentation on spring site. I can't consume them all and expect that i will know all of its concept so i learn by doing and testing stuff. And this is one of those time im stuck and can't move on. wanted to learn in step by step before i go do advance stuff.
UPDATES - modified the question, i've reading it over and over again. see new question
"Inside setSpellChecker." is printed because spellChecker bean is injected into TextEditor using setter injection as <property> tag is used in Beans.xml.
Below steps are executed to create bean of
TextEditor.
spellChecker (inner bean) so it prints 'Inside SpellChecker constructor.`spellChecker bean into TextEditor using TextEditor.setSpellChecker() as we are using setter injection.When TextEditor.setSpellChecker() gets called, it prints "Inside setSpellChecker" and assigns spellChecker TextEditor.spellChecker.