摘要: service.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:context="http://www.springframework.org/schema/context" xmlns:tx="ht 阅读全文
posted @ 2013-05-03 18:04 全新时代-小小程序员大梦想 阅读(374) 评论(0) 推荐(0) 编辑
摘要: Eclipse导入jar文件,spring-test.jar,spring.jar(版本2.5),junit-4.4.jarSpring的IOC注入的方式有:setter方式,构造函数方式,注解方式。注解方式可以在xml文件中对整个文件夹的bean配置,注入的时候通过注解标签调用,使代码更加简洁,易于维护。通过一个简单的例子+测试来说明:dao.xml<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema 阅读全文
posted @ 2013-05-03 13:50 全新时代-小小程序员大梦想 阅读(398) 评论(0) 推荐(0) 编辑