补充一下代码
public class SpringTest 
{
    public static void main(String[] args) throws IOException 
    {
      
        InputStream is = new FileInputStream("bean.xml");
        
        BeanFactory factory = new XmlBeanFactory(is);
        //此处出错,抛出异常
        //java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
        
      
        System.out.println("ok");
        
        HelloBean hello = (HelloBean) factory.getBean("helloBean");
        System.out.println(hello.getHelloWord());
    }
}