Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

163
Vistas
Spring inner bean instantiation

first of all please refer to this tutorial i've been reading.

Spring Injecting Inner Bean

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

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

"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.

  1. Create instance of spellChecker (inner bean) so it prints 'Inside SpellChecker constructor.`
  2. Set 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.

More on setter injection.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda