[JAVA] Spring 简述
1. 读取配置文件,new helloworld类调用hello方法.
2. 用Spring实现相同功能
- 引用Spring 框架, 在myeclipse中可以直接加载Spring框架,而在eclipse中则需要下载Spring框架所需的jar包,复制粘贴到WebRoot中的lib中
-增加xml配置文件,在myeclipse中加Spring框架时自动生成配置bean的xml文件,而在eclipse中则需要手动加该文件。new-xml(basic templates)-create dtd file-select xml catalog-spring dtd bean
-调用bean工厂方法实例化helloworld类
spring 设置注入(set方法)实例2
- 实例3
重要说明:
1.上述内容非原创,实转载网易课堂javaEE****。
2. 仅为个人记忆,便于日后回忆。