I tried testing Spring BeanFactory like this:
beans.xmlCode:import org.springframework.core.io.*; public class Foo { ClassPathResource res=new ClassPathResource("beans.xml"); FooBean fooBean; System.out.println(fooBean.getName()); }
Both files are located on the same directory. But nothing came out. I'm using eclipse for the IDE. What do I need to do in order to test the BeanFactory since the manual isn't comprehensive enough.Code:<beans> <bean id="fooBean" class="FooBean"> <property name="name"><value>Joshua</value></property> </bean> </beans>
Thnx


Reply With Quote