IDNStudy.com, kung saan ang mga eksperto at komunidad ay nagtutulungan para sagutin ang iyong mga tanong. Sumali sa aming platform ng tanong at sagot upang makakuha ng eksaktong tugon sa lahat ng iyong mahahalagang tanong.
Answer:
you can use Spring's component scan to autowire your beans.
Simply add
<context:component-scan base-package="<PACKAGE>" />
to your applicationContext.xml. You have to replace "" with the package you want to scan for beans.
Also, you have to annotate your beans with
@Component
to say "hey, this is a bean" to Spring. To inject dependencies into other beans, simply tag the field with