IDNStudy.com, kung saan ang kuryusidad ay nagtatagpo ng kalinawan. Ang aming mga eksperto ay nagbibigay ng mabilis at eksaktong sagot upang tulungan kang maunawaan at malutas ang anumang problema.
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