文档介绍:准备文件获取Spring framework jar包—— 最新的相关jar包(munity-download)——commons-logging--logging-,在spring中bean的管理是通过XML实现的,要用此功能,需要把bean配置到spring的xml新建一个xml文件spring-<?xmlversion=""encoding="UTF-8"?><!-- 注意要引入所用到的命名空间  比如用到了事务,所以要把事务的命名空间引入进来xmlns:tx="ema/tx ,引入的时候要注意前后要对应--><beansxmlns="ema/beans" xmlns:xsi="1/XMLSchema-instance" xsi:schemaLocation="ema/beans ema/beans/spring-beans-"> <bean></bean></beans>①Xmlns(XMLNameSpace)声明命名空间,建议是用网址做命名空间,但并不会去访问该网址,仅仅是与namespace和xsd(xsd是spring这个xml的schema文件,里面定义配置内容)里声明的targetNamespace保持一致.②,通常是用URL值对,中间用空格隔开,前面URL是命名空间,后面URL为schema的文件地址③xsd的存放地址,如果没有声明,(POJO类).;lassHelloWorld{ publicvoidhello(){ ("HelloWorld"); }}b) 把类通过xml配置注入<?xmlversion=""encoding="UTF-8"?><beansxmlns="ema/beans" xmlns:xsi="1/XMLSchema-instance" xsi:schemaLocation="ema/beans ema/beans/spring-beans-"> <beanid="hello"class=""></bean></beans>c) .;.;.;lassHelloWorldMain{ publicstaticvoidmain(Stringargs[]){ ApplicationContextctx=new ClassPathXmlApplicationContext("com