代码改变世界

2、Spring开发的jar文件

2015-10-18 14:19  怡红院丿无痕  阅读(209)  评论(0编辑  收藏  举报

1、所需要的jar文件

源码, jar文件:spring-framework-3.2.5.RELEASE

commons-logging-1.1.3.jar           日志

spring-beans-3.2.5.RELEASE.jar        bean节点

spring-context-3.2.5.RELEASE.jar       spring上下文节点

spring-core-3.2.5.RELEASE.jar         spring核心功能

spring-expression-3.2.5.RELEASE.jar    spring表达式相关表

spring-asm-3.2.0.M1.jar

 以上是必须引入的5jar文件,在项目中可以用户库管理!

2、核心配置文件: applicationContext.xml  

 

     Spring配置文件:applicationContext.xml / bean.xml

         配置文件的很全的一个

         

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
         http://www.springframework.org/schema/beans/spring-beans.xsd
          http://www.springframework.org/schema/context
         http://www.springframework.org/schema/context/spring-context.xsd
         http://www.springframework.org/schema/aop
         http://www.springframework.org/schema/aop/spring-aop.xsd
         http://www.springframework.org/schema/tx
          http://www.springframework.org/schema/tx/spring-tx.xsd">

    
    <bean id="userDao" class="cn.itcast.dao.UserDao" scope="singleton" lazy-init="false"></bean>
    
    
</beans>