摘要: spring web框架1.spring web mvc简介2.DispatcherServlet3.Controllers4.请求映射处理5.Views and resolving them6.Spring's multipart (fileupload) support(文件上传的支持)7.The Model - ModelMap (ModelAndView)8.The View - RequestToViewNameTranslator1.spring web mvc简介Spring's Web MVC framework is designed around a Dis 阅读全文
posted @ 2010-11-09 21:25 qiang.xu 阅读(3529) 评论(0) 推荐(0) 编辑
摘要: spring数据库操作配置实例1.datasource.properties2.applicationContext.xml1.datasource.propertiesDATABASE.URL=jdbc:mysql://localhost:3306/testDATABASE.DriverClassName=com.mysql.jdbc.DriverDATABASE.UserName=rootDATABASE.Password=1234562.applicationContext.xml <bean class="org.springframework.bean 阅读全文
posted @ 2010-11-09 16:09 qiang.xu 阅读(1577) 评论(0) 推荐(0) 编辑
摘要: spring的吃接话数据库访问1.通用DAO的支持2.spring对JDBC的支持 3.spring数据操作实例4.数据访问异常1.通用DAO的支持spring对通用dao的支持,通常可以如下的方式进行:通用dao类继承JdbcDaoSupport,在其中直接使用getJdbcTemplate实现数据的访问操作,同时在通用dao类中添加属性dataSource,同时设置dataSource的set方法。配置文件中首先需要设置DataSource,然后将datasource注入到通用的DAO中。2.spring对JDBC的支持 spring对于JDBC的支持主要是通过JdbcTemplate实现 阅读全文
posted @ 2010-11-09 15:02 qiang.xu 阅读(4199) 评论(0) 推荐(0) 编辑