ITeye博客

spring3.0配置

X_boy · 2011-09-15 23:44 · J2EE · 编程语言 · Markdown

Spring3.0最基本配置需要一下几个包 
org.springframework.asm-3.0.2.RELEASE.jar 
org.springframework.beans-3.0.2.RELEASE.jar 
org.springframework.context-3.0.2.RELEASE.jar 
org.springframework.core-3.0.2.RELEASE.jar 
org.springframework.expression-3.0.2.RELEASE.jar 
org.springframework.web-3.0.2.RELEASE.jar 

 

commons-logging-1.1.1.jar

 

Spring3.0配置文件bean.xml

 

 

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://www.springframework.org/schema/beans
  5. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
  6. <!-- services -->
  7. <bean id="userDao"
  8. class="fantasy0707.spring.dao.impl.UserDAOImpl"></bean>
  9. <bean id="service"
  10. class="fantasy0707.spring.service.UserService">
  11. <property name="dao" ref="userDao"/>
  12. <!-- additional collaborators and configuration for this bean go here -->
  13. </bean>
  14. <!-- more bean definitions for services go here -->
  15. </beans>

哈哈,我刚接触Spring3.0,就只会这么多了

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。