没有合适的资源?快使用搜索试试~ 我知道了~
spring live中文版.pdf
5星 · 超过95%的资源 需积分: 9 11 下载量 119 浏览量
2012-02-28
20:35:54
上传
评论 2
收藏 3.4MB PDF 举报
温馨提示
试读
324页
感谢你付费订阅了Spring Live,和以往的书不同的是,这本书会不断的修改,完善,并且在下 一年中会更加完美。你的订阅使得你有权决定在未来的12个月要添加哪些内容。1.0版的写作非 常有趣,使我欣喜不已的是能够不断更新这本书。 我们一起像一个团队一样,共同完成一本颇有深度,侧重实用的而又不乏味的有关Spring框架的 书籍。针对你提交的反馈,我会完善书已有的内容,或是添加一些能够取悦你的新篇幅。本书是 你我共同所有,让我们一起努力使它更加完善。 Spring Live是对Spring框架的介绍。1.0版的目标定位于那些对Spring 一无所知的读者。以后 更新的章节会针对Spring的高级用户。在以后的一年中,Spring框架也会不断发展和完善,你需 要一本像Spring Live一样的书来跟上新技术,以胜任你的工作。如果你打听到有一些正要启动 并准备使用了Spring中的某种特定技术的项目,请通知我,或许我可以在你项目启动前,写一个 相关的章节。 本书的管理和开源项目类似,每月将会释出一个版本,发布信息会在Spring Live WebBlog上 宣布。本书所有章节的源代码可以从http://sourcebeat.com/downloads上下载,网页上还提 供了每一章前后快照代码的链接。
资源推荐
资源详情
资源评论
Spring live中文版
Matt Raible
白汉奇[译]
版权 © 2004 SourceBeat, LLC
Many designations used by organizations to distinguish their products are claimed as trademarks. These trademarked names may appear in this book. We
use the names in an editorial fashion only with no intention of infringing on the trademark; therefore you will not see the use of a trademark symbol with
every occurrence of the trademarked name.
As every precaution has been taken in writing this book, the author and publisher will in no way be held liable for any loss or damages resulting from the
use of information contained in this book.
XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/
目录
关于作者 ......................................................................................................................................... xii
致谢 ............................................................................................................................................... xiii
简介 ............................................................................................................................................... xiv
翻译札记 ......................................................................................................................................... xvi
缘起 ....................................................................................................................................... xvi
在NetBeans中配置Equinox ......................................................................................................... xvi
1. Spring 简介 .................................................................................................................................... 26
Spring 诞生记 ............................................................................................................................ 26
关于Spring ................................................................................................................................ 26
为什么每个人都钟情于它 .................................................................................................. 26
对Spring的一些常见的批评 ................................................................................................ 27
Spring 的工作原理 ............................................................................................................. 27
Spring如何简化J2EE开发 ........................................................................................................... 28
接口编程 ......................................................................................................................... 29
简单的测试 ...................................................................................................................... 29
降低耦合:Factory Pattern vs Spring ..................................................................................... 29
本章小结 ................................................................................................................................. 31
2. Spring快速入门教程 ....................................................................................................................... 33
概述 ........................................................................................................................................ 33
下载Struts和Spring ..................................................................................................................... 33
下载Struts和Spring ..................................................................................................................... 34
创建项目目录和Ant Build文件 .................................................................................................... 35
Tomcat和Ant ..................................................................................................................... 36
为持久层编写单元测试 ............................................................................................................. 39
配置Hibernate和Spring ............................................................................................................... 41
Equinox中Spring是如何配置的 ............................................................................................ 42
用Hibernate实现UserDAO ........................................................................................................... 44
进行单元测试,用DAO验证CRUD操作 ....................................................................................... 45
创建Manager,声明事务处理 ..................................................................................................... 46
对Struts Action进行单元测试 ...................................................................................................... 50
为web层创建Action和Model(DynaActionForm) ............................................................................... 51
运行单元测试,验证Action的CRUD操作 ..................................................................................... 56
填充JSP文件,这样可以通过浏览器来进行CRUD操作 .................................................................. 57
通过浏览器验证JSP的功能 ......................................................................................................... 58
用Commons Validator添加验证 .................................................................................................... 60
在struts-config.xml中添加ValidatorPlugin ................................................................................ 60
创建validation.xml,指定lastName为必填字段 ....................................................................... 60
把 DynaActionForm 改为 DynaValidatorForm ......................................................................... 61
为save()方法设置验证(validation) .......................................................................................... 61
本章小结 ................................................................................................................................. 62
3. BeanFactory及其工作原理 ............................................................................................................... 63
关于BeanFactory ........................................................................................................................ 63
BeanFactory中一个bean的生命周期 .............................................................................................. 63
反转控制 ......................................................................................................................... 64
暴露bean定义 ................................................................................................................... 65
配置域属性和依赖关系 ..................................................................................................... 68
预先初始化bean ................................................................................................................ 69
就绪状态 ......................................................................................................................... 73
销毁bean .......................................................................................................................... 74
ApplicationContext:与bean交互 .................................................................................................. 74
抓取context ...................................................................................................................... 74
iv
XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/
单元测试和导入context的一些技巧 ..................................................................................... 75
国际化和MessageSource ...................................................................................................... 76
事件的发布和订阅 ............................................................................................................ 77
深入探讨MyUsers的ApplicationContext.xml ............................................................................ 77
本章小结 ................................................................................................................................. 78
4. Spring MVC 框架 ............................................................................................................................ 79
概述 ........................................................................................................................................ 79
Spring Controller单元测试 ........................................................................................................... 81
配置DispatcherServlet和ContextLoaderListener ................................................................................ 81
修改web.xml,使用Spring的DispatchServlet ........................................................................... 82
为UserController编写单元测试 ............................................................................................ 84
创建UserController,配置action-servlet.xml ............................................................................ 85
创建userList.jsp页面显示用户列表 ....................................................................................... 87
为UserFormController创建单元测试 ..................................................................................... 90
创建UserFormController,并在action-servlet.xml中配置它 ....................................................... 92
创建userForm.jsp页面,以便编辑用户资料 .......................................................................... 97
为Spring配置Commons Validator .......................................................................................... 99
SimpleFormController:方法生命周期回顾 .................................................................................. 102
Spring的JSP标签 ...................................................................................................................... 104
本章小结 ................................................................................................................................ 105
5. 高级的MVC框架----使用模板,验证,异常处理,文件上传 ............................................................. 106
SiteMesh模板技术 .................................................................................................................... 106
安装和配置 .................................................................................................................... 107
Tiles模板技术 .......................................................................................................................... 111
安装和配置 .................................................................................................................... 111
Spring验证方法 ....................................................................................................................... 117
使用Commons Validator ............................................................................................................ 119
XDoclet .......................................................................................................................... 120
一系列的验证器 .............................................................................................................. 121
在业务委派中进行验证 .................................................................................................... 121
Spring未来的声明式验证框架 ........................................................................................... 122
控制器中的异常处理 ............................................................................................................... 123
上传文件 ................................................................................................................................ 126
拦截请求 ................................................................................................................................ 131
发送邮件 ................................................................................................................................ 133
本章小结 ................................................................................................................................ 135
6. View的多种选择 ........................................................................................................................... 136
View(视图)和ViewResolver(视图解析器) ...................................................................................... 136
利用jWebUnit测试View ............................................................................................................. 138
JSP ......................................................................................................................................... 140
View Resolver配置 ............................................................................................................ 140
JSTL .............................................................................................................................. 142
Tiles ............................................................................................................................... 143
Velocity ................................................................................................................................... 144
在MyUsers中使用Velocity .................................................................................................. 144
SiteMesh和Velocity ............................................................................................................ 146
创建Velocity模板 ............................................................................................................. 148
部署和测试 .................................................................................................................... 150
Velocity小结 .................................................................................................................... 151
FreeMarker .............................................................................................................................. 151
View Resolver配置 ............................................................................................................ 151
SiteMesh和FreeMarker ....................................................................................................... 152
创建FreeMarker模板 ......................................................................................................... 155
部署和测试 .................................................................................................................... 158
v
Spring live中文版
XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/
剩余323页未读,继续阅读
资源评论
- y2009210601342013-01-23内容讲解的很细制,不错的一本书。
- newSaa2012-12-22pdf很全,内容充实
- 改bug的小老弟2015-02-04谢谢了,看一下里面的东西
flyli168
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功