spring是一个非常活跃的开源框架,他是一个基于core来架构的多层JavaEE的框架,他的主要目的是简化企业级开发。
使用spring框架,需要用到spring框架的核心jar包,需要的话,这是链接http://pan.baidu.com/s/1cd9DHs
spring的配置文件有固定的的名字:applicationContext.xml
这是配置文件的xsd文件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
</beans>
也可以创建多个配置文件,在总的配置文件里面导入一下也行:<import resource="com/cal/spring/sh/createobject/method/applicationContext-createobject-method.xml"/>
也可以给配置文件里面的方法自定义一个名字。例如:<alias name="helloWorld_Allas" alias="king"/>但是这里的name要和上面的id一样,否则解析xml文件是时会报错。