More Related Content
Similar to Spring 2.0 技術手冊目錄
Similar to Spring 2.0 技術手冊目錄(20)
Spring 2.0 技術手冊目錄
- 1. 目錄
讀導 ............................................................................................ix
Chapter 1 識認 Spring
1.1 紹介語術 . .............................................................................................1-2
1.2 (轉反制控 I nversion of Control ) ..........................................................1-6
1.3 (入注賴依 D ependency Injection ) ..................................................... 1-13
1.4 題主的來下接 ..................................................................................... 1-16
Chapter 2 Spring 門入
2.1 Spring
式程 個一第 .............................................................................. 2-2
2.1.1 定設、載下 Spring ...................................................................... 2-2
2.1.2
用使(境環計設 備準Spring Eclipse ) . ........................................ 2-5
2.1.3
式程 個一第寫撰 Spring .............................................................. 2-9
2.1.4
式程 個二第寫撰 Spring ............................................................. 2-14
2.1.5 Spring 2.0
定設 的 XML . ............................................................. 2-17
2.2 Spring IDE ........................................................................ 2-19
用使、裝安
2.2.1 裝安Spring IDE ......................................................................... 2-19
2.2.2 用使Spring IDE ........................................................................2-22
- 2. Spring 2.0 良信林(冊手術技 – http://openhome.cc )
2.3 題主的來下接 . .................................................................................... 2-26
Chapter 3 IoC 器容
3.1 Bean 理管本基 ..................................................................................... 3-2
3.1.1 BeanFactory
、 A pplicationContext ............................................... 3-2
3.1.2 Bean
名別與稱名別識的 .............................................................. 3-5
3.1.3 Bean 化例實的 ............................................................................ 3-7
3.1.4 Bean 的 scope ............................................................................ 3-9
3.1.5 Bean 期周命生的 . ....................................................................... 3-11
3.1.6 Bean 承繼的義定 ...................................................................... 3-14
3.2 Bean 定設賴依的 . ............................................................................... 3-18
3.2.1 Type 2 IoC
、 T ype 3 IoC ............................................................. 3-18
3.2.2 考參與定設值的賴依 ................................................................. 3-23
3.2.3 定綁動自.................................................................................. 3-26
3.2.4 件物合集. ..................................................................................3-33
3.2.5 Spring 2.0
籤標 的 < util> . ............................................................ 3-42
3.2.6 Lookup Method Injection .......................................................... 3-45
3.3 Bean ................................................................................... 3-49
理管階進
3.3.1 XML
式方態組的檔義定 非 ......................................................... 3-49
3.3.2 Aware 面介關相 . ....................................................................... 3-52
3.3.3 BeanPostProcessor ................................................................... 3-54
3.3.4 BeanFactoryPostProcessor ........................................................ 3-58
3.3.5 PropertyPlaceholderConfigurer.................................................. 3-59
3.3.6 PropertyOverrideConfigurer ...................................................... 3-61
3.3.7 CustomEditorConfigurer ............................................................ 3-62
3.4 件事、息訊、源資 . ............................................................................. 3-68
3.4.1
得取的源資 . .............................................................................. 3-68
- 3. 錄目
3.4.2
息訊字文析解 . ........................................................................... 3-69
3.4.3
件事聽傾 .................................................................................. 3-72
3.4.4
播傳件事 .................................................................................. 3-73
3.5 題主的來下接 ..................................................................................... 3-77
Chapter 4 Spring AOP
4.1 AOP . ........................................................................................... 4-2
門入
4.1.1 探初制機理代從 AOP .................................................................. 4-2
4.1.2 AOP
語術與念觀 ....................................................................... 4-11
4.1.3 Spring AOP ............................................................................... 4-15
4.2 Advices.............................................................................................. 4-18
4.2.1 Before Advice ........................................................................... 4-18
4.2.2 After Advice .............................................................................4-22
4.2.3 Around Advice .......................................................................... 4-25
4.2.4 Throw Advice ...........................................................................4-28
4.3 Pointcut 、 A dvisor .............................................................................. 4-33
4.3.1 NameMatchMethodPointcutAdvisor ........................................... 4-33
4.3.2 RegExpMethodPointcutAdvisor .................................................. 4-37
4.3.3 ControlFlowPointcut ................................................................. 4-39
4.3.4 Pointcut 面介. ...........................................................................4-44
4.3.5 Pointcut 作操集聯、集交 ...........................................................4-45
4.4 Introduction.......................................................................................4-48
4.4.1 IntroductionInterceptor .............................................................4-48
4.4.2 DelegatingIntroductionInterceptor............................................. 4-53
4.5 Autoproxing .......................................................................................4-59
4.5.1 BeanNameAutoProxyCreator .....................................................4-59
4.5.2 DefaultAdvisorAutoProxyCreator ...............................................4-60
4.6 Spring 2.0 的 AOP 援支 . ...................................................................... 4-63
- 4. Spring 2.0 良信林(冊手術技 – http://openhome.cc )
4.6.1 Before Advice 於基: XML Schema ............................................. 4-63
4.6.2 Before Advice 於基: Annotation ............................................... 4-67
4.6.3 Spring 2.0 的 Pointcut 義定 ....................................................... 4-69
4.6.4 After Returning Advice 於基: XML Schema ............................... 4-72
4.6.5 After Returning Advice 於基: Annotation .................................. 4-75
4.6.6 After Throwing Advice 於基: XML Schema ................................ 4-76
4.6.7 After Throwing Advice 於基: Annotation ................................... 4-80
4.6.8 Around Advice 於基: XML Schema ............................................ 4-82
4.6.9 Around Advice 於基: Annotation .............................................. 4-84
4.7 題主的來下接 . .................................................................................... 4-86
Chapter 5 JDBC 援支易交、
5.1 Spring 門入層久持 . ............................................................................... 5-2
5.1.1 Spring
持支 的 DAO .................................................................... 5-2
5.1.2 DataSource
入注 . ........................................................................ 5-8
5.1.3 DataSource
換置 . ...................................................................... 5-15
5.2 JDBC ......................................................................................... 5-19
援支
5.2.1 JdbcTemplate ................................................................... 5-19
用使
5.2.2 JdbcTemplate
新更與行執 . ........................................................ 5-21
5.2.3 JdbcTemplate
詢查 ................................................................... 5-26
5.2.4 JdbcTemplate
援支 的 Lob ........................................................ 5-29
5.2.5 作操行進式方件物以 ..................................................................5-31
5.2.6 DataFieldMaxValueIncrementer..................................................5-37
5.2.7 Spring 2.0 的 NamedParameterJdbcTemplate ..............................5-37
5.2.8 Spring 2.0 的 SimpleJdbcTemplate ............................................ 5-40
5.3 JDBC 理管易交. .................................................................................. 5-43
5.3.1 Spring
援支的易交對 ................................................................. 5-43
v
- 5. 錄目
5.3.2 JDBC
理管易交程編 ...................................................................5-46
5.3.3 JDBC
理管易交告宣 ...................................................................5-49
5.3.4 紹介性屬的易交 ........................................................................ 5-54
5.3.5 TransactionAttributeSource
、 T ransactionAttribute ..................... 5-57
5.3.6 Spring 2.0 於基:理管易交式告宣 XML Schmea ...........................5-62
5.3.7 Spring 2.0 於基:理管易交式告宣 Annotation .............................5-64
5.4 題主的來下接 .....................................................................................5-68
Chapter 6 Hibernate 與 Spring
6.1 Hibernate
門入 . ................................................................................... 6-2
6.1.1
介簡 Hibernate ........................................................................... 6-2
6.1.2
定設、載下 Hibernate................................................................. 6-5
6.1.3
個一第 Hibernate 式程 . ............................................................... 6-8
6.2 合整中Spring
在 Hibernate ................................................................. 6-17
6.2.1 SessionFactory 入注 .................................................................. 6-17
6.2.2 HibernateTemplate ................................................................... 6-21
6.2.3 HibernateTemplate
的 Lob 援支 .................................................6-24
6.2.4 Hibernate 理管易交程編 ............................................................ 6-27
6.2.5 Hibernate 理管易交告宣 ............................................................6-29
6.3 題主的來下接 ..................................................................................... 6-37
Chapter 7 Spring Web MVC 架框
7.1 Spring Web MVC 門入 ...........................................................................7-2
7.1.1 用使 Eclipse Web Tools Platform ..................................................7-2
7.1.2 個一第 Spring Web MVC 式程 . ......................................................7-6
7.1.3 WebApplicationContext ............................................................. 7-12
7.1.4 Handler Mapping ....................................................................... 7-16
v
- 6. Spring 2.0 良信林(冊手術技 – http://openhome.cc )
7.1.5 Handler Interceptor....................................................................7-19
7.1.6 Controller 構架承繼 .................................................................. 7-22
7.1.7 ModelAndView.......................................................................... 7-25
7.1.8 View Resolver ........................................................................... 7-29
7.1.9 Exception Resolver .................................................................... 7-33
7.2 Controller 別類作實 . ............................................................................7-34
7.2.1 AbstractController .....................................................................7-34
7.2.2 MultiActionController 與 ParameterMethodNameResolver ...........7-36
7.2.3 MultiActionController 與 PropertiesMethodNameResolver........... 7-40
7.2.4 ParameterizableViewController ................................................. 7-44
7.2.5 AbstractCommandController ..................................................... 7-45
7.2.6 AbstractFormController ............................................................ 7-49
7.2.7 SimpleFormController ................................................................ 7-51
7.2.8 AbstractWizardFormController .................................................. 7-56
7.2.9 ThrowawayController.................................................................7-63
7.3 配搭 Controller 別類關相的 . ................................................................ 7-66
7.3.1
作實 Validator........................................................................... 7-66
7.3.2
用使 PropertyEditor .................................................................. 7-69
7.3.3
傳上案檔 ...................................................................................7-74
7.4 題主的來下接 . .................................................................................... 7-80
Chapter 8 View 、案方層 W eb 合整架框
8.1 與 合結 JSTL Spring 籤標 . ..................................................................... 8-2
8.1.1
合結 JSTL ................................................................................... 8-2
8.1.2 <spring:bind>
籤標 . ..................................................................... 8-5
8.1.3 法方個幾的定綁據數 ................................................................... 8-9
8.1.4 <spring:message>
籤標 ............................................................. 8-12
v
- 7. 錄目
8.1.5 <spring:transform> 籤標 ............................................................ 8-15
8.1.6 Spring 2.0 的 form 籤標 ............................................................. 8-21
8.2 View
術技 它其 . ..................................................................................8-24
8.2.1
例為 以 Tiles .............................................................................8-24
8.2.2 訂自 View Class ........................................................................ 8-30
8.3 架框 Struts
合整 ................................................................................. 8-34
8.3.1
式程 個一第 Struts . .................................................................... 8-34
8.3.2
合整中 在 Struts Spring ............................................................. 8-39
8.4 JSF
架框 合整 . ....................................................................................8-45
8.4.1
式程 個一第 JSF ........................................................................8-45
8.4.2
合整中 在 JSF Spring ................................................................. 8-53
8.5 題主的來下接 .....................................................................................8-59
Chapter 9 API 裝封
9.1 程遠 ................................................................................................... 9-2
9.1.1 RMI ......................................................................................... 9-2
9.1.2 Hessian 、 B urlap .......................................................................9-7
9.1.3 Http Invoker ........................................................................... 9-11
9.2 件郵 .................................................................................................. 9-14
9.2.1 件郵單簡 ................................................................................ 9-14
9.2.2 HTML 件郵 ............................................................................. 9-15
9.2.3 檔附或片圖嵌內 ...................................................................... 9-17
9.3 程排 .................................................................................................. 9-21
9.3.1 用使 TimerTask ....................................................................... 9-21
9.3.2 用使 MethodInvokingTimerTaskFactoryBean ............................9-24
9.3.3 用使 Quartz ............................................................................9-25
9.3.4 用使 MethodInvokingJobDetailFactoryBean .............................. 9-31
v
- 8. Spring 2.0 良信林(冊手術技 – http://openhome.cc )
9.4 題主的來下接 .................................................................................... 9-34
Chapter 10 :案專 S pring 籤書上線
10.1 觀概式程 . ......................................................................................... 10-2
10.1.1
劃規構架 . .............................................................................. 10-2
10.1.2
術技用採 .............................................................................. 10-4
10.1.3
述概能功 .............................................................................. 10-5
10.2 Model
計設 ...................................................................................... 10-6
10.2.1 UserDAO .............................................................................. 10-6
10.2.2 BookmarkDAO..................................................................... 10-10
10.2.3 SimpleMail .......................................................................... 10-14
10.3 View 計設 ....................................................................................... 10-16
10.3.1 Tag Files .............................................................................. 10-16
10.3.2 頁網冊註 ............................................................................. 10-18
10.3.3 頁網入登 ............................................................................. 10-21
10.3.4 頁網員會 ............................................................................ 10-24
10.3.5 頁網籤書入加 . ..................................................................... 10-26
10.3.6 頁網碼密回取、變改 . ............................................................ 10-27
10.3.7 向導新重頁首 . ..................................................................... 10-29
10.4 Controller 計設 ............................................................................... 10-31
10.4.1 RegisterController................................................................ 10-31
10.4.2 LoginController ................................................................... 10-35
10.4.3 MemberController................................................................ 10-37
10.4.4 ForgotController ................................................................. 10-42
10.5 定設態組 . ....................................................................................... 10-44
10.5.1
定設 web.xml ...................................................................... 10-44
10.5.2
定設 web-config.xml ............................................................10-45
v
- 9. 錄目
10.5.3
定設 model-config.xml ......................................................... 10-47
10.6 題主的來下接 ................................................................................. 10-50