---
title: "spring3.0配置"
author: "X_boy"
date: "2011-09-15T23:44:37Z"
tags: []
categories: ["编程语言"]
slug: "spring3-0"
draft: false
lastmod: "2011-09-15T23:44:37Z"
id: 1173029
url: "https://x-boy.iteye.com/blog/1173029"
---

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

 

 

01. &lt;?xml version="1.0" encoding="UTF-8"?&gt;
02. &lt;beans xmlns="http://www.springframework.org/schema/beans"
03. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
04. xsi:schemaLocation="http://www.springframework.org/schema/beans
05. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"&gt;
06. &lt;!-- services --&gt;
07. &lt;bean id="userDao"
08. class="fantasy0707.spring.dao.impl.UserDAOImpl"&gt;&lt;/bean&gt;
09. &lt;bean id="service"
10. class="fantasy0707.spring.service.UserService"&gt;
11. &lt;property name="dao" ref="userDao"/&gt;
12. &lt;!-- additional collaborators and configuration for this bean go here --&gt;
13. &lt;/bean&gt;
14. &lt;!-- more bean definitions for services go here --&gt;
15. &lt;/beans&gt;

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