锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲va中文字幕无码,亚洲第一成年人网站,亚洲免费观看视频http://m.tkk7.com/andyj2ee/category/850.htmljava tec skyzh-cnWed, 28 Feb 2007 14:57:28 GMTWed, 28 Feb 2007 14:57:28 GMT60鍩轟簬spring aop 鏉冮檺綆$悊緋葷粺鍘熷瀷<2>http://m.tkk7.com/andyj2ee/articles/2996.htmljava鍏夌幆java鍏夌幆Fri, 08 Apr 2005 07:15:00 GMThttp://m.tkk7.com/andyj2ee/articles/2996.htmlhttp://m.tkk7.com/andyj2ee/comments/2996.htmlhttp://m.tkk7.com/andyj2ee/articles/2996.html#Feedback0http://m.tkk7.com/andyj2ee/comments/commentRss/2996.htmlhttp://m.tkk7.com/andyj2ee/services/trackbacks/2996.html闃呰鍏ㄦ枃

java鍏夌幆 2005-04-08 15:15 鍙戣〃璇勮
]]>
鍩轟簬spring aop 鏉冮檺綆$悊緋葷粺鍘熷瀷<1>http://m.tkk7.com/andyj2ee/articles/2664.htmljava鍏夌幆java鍏夌幆Thu, 31 Mar 2005 08:51:00 GMThttp://m.tkk7.com/andyj2ee/articles/2664.htmlhttp://m.tkk7.com/andyj2ee/comments/2664.htmlhttp://m.tkk7.com/andyj2ee/articles/2664.html#Feedback0http://m.tkk7.com/andyj2ee/comments/commentRss/2664.htmlhttp://m.tkk7.com/andyj2ee/services/trackbacks/2664.html闃呰鍏ㄦ枃

java鍏夌幆 2005-03-31 16:51 鍙戣〃璇勮
]]>
spring live 鐩綍http://m.tkk7.com/andyj2ee/articles/2431.htmljava鍏夌幆java鍏夌幆Fri, 25 Mar 2005 03:37:00 GMThttp://m.tkk7.com/andyj2ee/articles/2431.htmlhttp://m.tkk7.com/andyj2ee/comments/2431.htmlhttp://m.tkk7.com/andyj2ee/articles/2431.html#Feedback0http://m.tkk7.com/andyj2ee/comments/commentRss/2431.htmlhttp://m.tkk7.com/andyj2ee/services/trackbacks/2431.htmlSpring Live

Spring Live

Chapter Summaries

This book is written for Java developers familiar with web frameworks. Its main purpose is for Java developers to learn Spring and evaluate it against other frameworks. One of my hopes is to compare Spring to other web frameworks, or at least show how it can be integrated with other frameworks (i.e. Struts, WebWork, maybe even Tapestry down the road). This book will contain a usable sample application that includes Spring code to wire DAOs and Services together. The book does have a bit of a Struts perspective to it as I have been a Struts developer for almost three years and Struts is the most popular web framework today. It is only natural that I use my experience in my writing.

Chapter 1: Introducing Spring covers the basics of Spring, how it came to be and why it鈥檚 getting so much press and rave reviews. It compares the traditional way of resolving dependencies (binding interfaces to implementations using a Factory Pattern) and how Spring does it all in XML. It also briefly covers how it simplifies the Hibernate API.

Chapter 2: Spring Quick Start Tutorial is a tutorial on how to write a simple Spring web application using the Struts MVC framework for the front end, Spring for the middle-tier glue, and Hibernate for the back end. In Chapter 4, this application will be refactored to use the Spring MVC framework.

Chapter 3: The BeanFactory and How It Works. The BeanFactory represents the heart of Spring, so it鈥檚 important to know how it works. This chapter explains how bean definitions are written, their properties, dependencies, and autowiring. It also explains the logic behind making singleton beans versus prototypes. Then it delves into Inversion of Control, how it works, and the simplicity it brings. This chapter dissects the Lifecyle of a bean in the BeanFactory to show how it works. This chapter also inspects the applicationContext.xml file for the MyUsers application created in Chapter 2.

Chapter 4: Spring鈥檚 MVC Framework describes the many features of Spring鈥檚 MVC framework. It shows you how to replace the Struts layer in MyUsers with Spring. It covers the DispatcherServlet, various Controllers, Handler Mappings, View Resolvers, Validation and Internationalization. It also briefly covers Spring鈥檚 JSP Tags.

Chapter 5: Advanced MVC covers advanced topics in web frameworks, particularly validation and page decoration.It shows the user how to use Tiles or SiteMesh to decorate a web application. It also explains how the Spring framework handles validation, and shows examples of using it in the web business layers. Finally, it explains a strategy for handling exceptions in the controllers, how to upload files and how to send e-mail.

Chapter 6: View Options covers the view options in Spring鈥檚 MVC architecture. At the time of this writing, the options are JSP, Velocity, FreeMarker, XSLT, PDF and Excel. This chapter aims to become a reference for configuring all Spring-supported views. It also contains a brief overview how each view works and compares constructing a page in MyUsers with each option. Additionally, it focuses on internationalization for each view

option.

Chapter 7: Persistence Strategies. Hibernate is quickly becoming a popular choice for persistence in Java applications, but sometimes it doesn鈥檛 fit. If you have an existing database schema, or even pre-written SQL, sometimes it鈥檚 better to use JDBC or iBATIS (which supports externalized SQL in XML files). This chapter refactors the MyUsers application to support both JDBC and iBATIS as persistence framework options. It also

implements the UserDAO using JDO and OJB to showcase Spring's excellent support for these frameworks.

Chapter 8: Testing Spring Applications explains how to use test-driven development to create high-quality, well-tested, Spring-based applications. You will learn how to test your components using tools like EasyMock, jMock and DBUnit. For the Controllers, you will learn how to use Cactus for in-container testing, and Spring Mocks for out-of-container testing. Lastly, you will learn how to use jWebUnit and Canoo's WebTest for testing the web interface.

Chapter 9: AOP. Aspect Oriented Programming has received a lot of hype in the Java community in the last year. What is AOP and how can it help you in your applications? This chapter will cover the basics of AOP and give some useful examples of how AOP might help you.

Chapter 10: Transactions. Transactions are an important part of J2EE, allowing you to view several database calls as one and roll them back if they don鈥檛 all succeed. One of the most highlighted features of EJBs is declarative transactions. This chapter demonstrates how Spring simplifies using declarative and programmatic transactions.

Chapter 11: Web Framework Integration. Spring has its own web framework, but it also integrates well with other frameworks. This allows you to leverage your existing knowledge and still use Spring to manage your business objects and data layer. This chapter explores Spring integration with four popular web frameworks: JSF, Struts, Tapestry and WebWork.

Appendix A: Examples and References includes explicit examples of JSF, Tapestry, and WebWork integration.

 



java鍏夌幆 2005-03-25 11:37 鍙戣〃璇勮
]]>
Spring in Action 鐩綍http://m.tkk7.com/andyj2ee/articles/2429.htmljava鍏夌幆java鍏夌幆Fri, 25 Mar 2005 02:57:00 GMThttp://m.tkk7.com/andyj2ee/articles/2429.htmlhttp://m.tkk7.com/andyj2ee/comments/2429.htmlhttp://m.tkk7.com/andyj2ee/articles/2429.html#Feedback0http://m.tkk7.com/andyj2ee/comments/commentRss/2429.htmlhttp://m.tkk7.com/andyj2ee/services/trackbacks/2429.html
Part 1  Spring essentials   1


1  A Spring jump start   3
1.1 Why Spring? 5
A day in the life of a J2EE developer 5
Spring鈥檚 pledge 6
1.2 What is Spring? 8
Spring modules 9
1.3 Spring jump start 12
1.4 Understanding inversion of control 15
Injecting dependencies 16
IoC in action 16
IoC in enterprise applications 23
1.5 Applying aspect-oriented programming 25
Introducing AOP 25
AOP in action 27
AOP in the enterprise 30
1.6 Spring alternatives 33
Comparing Spring to EJB 33
Considering other lightweight containers 36
Web frameworks 38
Persistence frameworks 40
1.7 Summary 40
2  Wiring beans   42
2.1 Containing your beans 44
Introducing the BeanFactory 44
Working with an application context 46
A bean鈥檚 life 47
2.2 Basic wiring 50
Wiring with XML 54
Adding a bean 55
Injecting dependencies via setter methods 58
Injecting dependencies via constructor 65
2.3 Autowiring 69
Handling ambiguities of autowiring 71
Mixing auto and explicit wiring 72
Autowiring by default 72
To autowire or not to autowire 72
2.4 Working with Spring鈥檚 special beans 73
Postprocessing beans 74
Postprocessing the bean factory 76
Externalizing the configuration 78
Customizing property editors 80
Resolving text messages 83
Listening for events 85
Publishing events 86
Making beans aware 87
2.5 Summary 90
3  Creating aspects   91
3.1 Introducing AOP 92
Defining AOP terminology 93
Spring鈥檚 AOP implementation 95
3.2 Creating advice 97
Before advice 99
After advice 101
Around advice 102
Throws advice 104
Introduction advice 105
3.3 Defining pointcuts 105
Defining a pointcut in Spring 105
Understanding advisors 107
Using Spring鈥檚 static pointcuts 107
Using dynamic pointcuts 111
Pointcut operations 113
3.4 Creating introductions 115
Implementing IntroductionInterceptor 115
Creating an IntroductionAdvisor 119
Using introduction advice carefully 120
3.5 Using ProxyFactoryBean 122
3.6 Autoproxying 124
BeanNameAutoProxyCreator 124
DefaultAdvisorAutoProxy-Creator 126
Metadata autoproxying 128
3.7 Summary 128

Part 2  Spring in the business layer   131


4  Hitting the database   133
4.1 Learning Spring鈥檚 DAO philosophy 134
Understanding Spring鈥檚 DataAccessException 135
Working with DataSources 137
Consistent DAO support 139
4.2 Using JDBC with Spring 141
The problem with JDBC code 142
Using JdbcTemplate 144
Creating operations as objects 152
Auto-incrementing keys 155
4.3 Introducing Spring鈥檚 ORM framework support 156
4.4 Integrating Hibernate with Spring 157
Hibernate overview 157
Managing Hibernate resources 159
Accessing Hibernate through HibernateTemplate 162
Subclassing HibernateDaoSupport 163
4.5 Spring and JDO 164
Configuring JDO 164
Accessing data with JdoTemplate 165
4.6 Spring and iBATIS 166
Setting up SQL Maps 167
Using SqlMapClientTemplate 168
4.7 Spring and OJB 169
Setting up OJB鈥檚 PersistenceBroker 169
4.8 Summary 171
5  Managing transactions   173
5.1 Understanding transactions 174
Explaining transactions in only four words 176
Understanding Spring鈥檚 transaction management support 177
Introducing Spring鈥檚 transaction manager 178
5.2 Programming transactions in Spring 181
5.3 Declaring transactions 183
Understanding transaction attributes 185
Declaring a simple transaction policy 189
5.4 Declaring transactions by method name 191
Using NameMatchTransactionAttributeSource 191
Shortcutting name-matched transactions 194
5.5 Declaring transactions with metadata 195
Sourcing transaction attributes from metadata 196
Declaring transactions with Commons Attributes 197
5.6 Trimming down transaction declarations 201
Inheriting from a parent TransactionProxyFactoryBean 202
Autoproxying transactions 203
5.7 Summary 206
6  Remoting   207
6.1 Spring remoting overview 208
6.2 Working with RMI 212
Wiring RMI services 212
Exporting RMI services 214
6.3 Remoting with Hessian and Burlap 218
Accessing Hessian/Burlap services 219
Exposing bean functionality with Hessian/Burlap 220
6.4 Using Http invoker 223
Accessing services via HTTP 224
Exposing beans as HTTP Services 225
6.5 Working with EJBs 226
Accessing EJBs 227
Developing Spring-enabled EJBs 231
6.6 Using JAX-RPC web services 233
Referencing a web service with JAX-RPC 234
Wiring a web service in Spring 236
6.7 Summary 238
7  Accessing enterprise services   240
7.1 Retrieving objects from JNDI 241
Working with conventional JNDI 241
Proxying JNDI objects 243
7.2 Sending e-mail 244
7.3 Scheduling tasks 248
Scheduling with Java鈥檚 Timer 248
Using the Quartz scheduler 250
Invoking methods on a schedule 254
7.4 Sending messages with JMS 256
Sending messages with JMS templates 257
Consuming messages 261
Converting messages 263
7.5 Summary 266

Part 3  Spring in the web layer   267


8  Building the web layer   269
8.1 Getting started with Spring MVC 270
A day in the life of a request 271
Configuring DispatcherServlet 272
Spring MVC in a nutshell 275
8.2 Mapping requests to controllers 279
Mapping URLs to bean names 280
Using SimpleUrlHandlerMapping 281
Using metadata to map controllers 281
Working with multiple handler mappings 282
8.3 Handling requests with controllers 283
Writing a simple controller 285
Processing commands 287
Processing form submissions 289
Processing complex forms with wizards 294
Handling multiple actions in one controller 301
Working with Throwaway controllers 305
8.4 Resolving views 307
Using template views 308
Resolving view beans 310
Choosing a view resolver 313
8.5 Using Spring鈥檚 bind tag 314
8.6 Handling exceptions 317
8.7 Summary 317
9  View layer alternatives   319
9.1 Using Velocity templates 321
Defining the Velocity view 321
Configuring the Velocity engine 322
Resolving Velocity views 323
Formatting dates and numbers 324
Exposing request and session attributes 325
Binding form fields in Velocity 326
9.2 Working with FreeMarker 327
Constructing a FreeMarker view 328
Configuring the FreeMarker engine 329
Resolving FreeMarker views 330
Binding form fields in FreeMarker 330
9.3 Designing page layout with Tiles 332
Tile views 332
Tile controllers 335
9.4 Generating non-HTML output 337
Producing Excel spreadsheets 338
Generating PDF documents 340
Generating other non-HTML files 343
9.5 Summary 344
10  Working with other web frameworks   346
10.1 Working with Jakarta Struts 347
Registering the Spring plug-in 348
Implementing Spring-aware Struts actions 348
Delegating actions 350
10.2 Working with Tapestry 352
Replacing the Tapestry Engine 353
Loading Spring beans into Tapestry pages 355
10.3 Integrating with JavaServer Faces 357
Resolving variables 357
Publishing request handled events 361
10.4 Integrating with WebWork 362
WebWork 1 363
XWork/WebWork2 364
10.5 Summary 365
11  Securing Spring applications   367
11.1 Introducing the Acegi Security System 368
Security interceptors 369
Authentication managers 370
Access decisions managers 370
Run-as managers 370
11.2 Managing authentication 371
Configuring a provider manager 371
Authenticating against a database 373
Authenticating against an LDAP repository 382
Enabling Single Sign-On with Acegi and Yale CAS 384
11.3 Controlling access 389
Voting access decisions 389
Deciding how to vote 390
Handling voter abstinence 392
11.4 Securing web applications 392
Proxying Acegi鈥檚 filters 394
Enforcing web security 397
Processing a login 400
Setting up the security context 406
Ensuring a secure channel 407
Using the Acegi tag library 411
11.5 Securing method invocations 412
Creating a security aspect 412
Securing methods using metadata 414
11.6 Summary 416
A  Spring setup   417
A.1 Downloading Spring 418
A.2 Choosing a distribution 418
A.3 Setting up your project 419 A.4 Building with Ant 420
B  Spring-related projects   422
B.1 AppFuse 423
B.2 Rich Client Project 424
B.3 Spring.NET 424

index 427


java鍏夌幆 2005-03-25 10:57 鍙戣〃璇勮
]]>
pro spring 鐩綍http://m.tkk7.com/andyj2ee/articles/2413.htmljava鍏夌幆java鍏夌幆Thu, 24 Mar 2005 11:03:00 GMThttp://m.tkk7.com/andyj2ee/articles/2413.htmlhttp://m.tkk7.com/andyj2ee/comments/2413.htmlhttp://m.tkk7.com/andyj2ee/articles/2413.html#Feedback0http://m.tkk7.com/andyj2ee/comments/commentRss/2413.htmlhttp://m.tkk7.com/andyj2ee/services/trackbacks/2413.htmlROB HARROP AND JAN MACHACEK
Pro Spring
Copyright . 2005 by Rob Harrop and Jan Machacek
Contents at a Glance
PART 1 Getting Started with Spring
CHAPTER 1 Introducing Spring . . . . . . . . . . . . . . . . . . . . . . . .3
CHAPTER 2 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . 15
CHAPTER 3 The Sample Application . . . . . . . . . . . . . . . . . . . . . .35
PART 2 Spring Basics
CHAPTER 4 Introducing Inversion of Control . . . . . . . . . . . . . . . . .49
CHAPTER 5 Beyond the Basics . . . . . . . . . . . . . . . . . . . . . . . . 93
PART 3 Aspect Oriented Programming
with Spring
CHAPTER 6 Introducing Spring AOP . . . . . . . . . . . . . . . . . . . . . .157
CHAPTER 7 More on Spring AOP . . . . . . . . . . . . . . . . . . . . . . . .205
PART 4 Data Access with Spring
CHAPTER 8 Spring JDBC Support . . . . . . . . . . . . . . . . . . . . . . . 249
CHAPTER 9 Using Hibernate in Spring Applications . . . . . . . . . . . . . .279
CHAPTER 10 iBATIS Integration . . . . . . . . . . . . . . . . . . . . . . . 311
PART 5  Spring in the Middle Tier
CHAPTER 11 Designing and Implementing Spring-Based Applications . . . . . . 353
CHAPTER 12 Transaction Management . . . . . . . . . . . . . . . . . . . . . 395
CHAPTER 13 Spring and J2EE . . . . . . . . . . . . . . . . . . . . . . . . .439
CHAPTER 14 Job Scheduling with Spring . . . . . . . . . . . . . . . . . . . 487
CHAPTER 15 Mail Support in Spring . . . . . . . . . . . . . . . . . . . . . 517
CHAPTER 16 Using Spring Remoting . . . . . . . . . . . . . . . . . . . . . .549
PART 6  Web Applications with Spring
CHAPTER 17 Web Applications with Spring MVC . . . . . . . . . . . . . . . . 599
CHAPTER 18 Beyond JSP . . . . . . . . . . . . . . . . . . . . . . . . . . . 645
CHAPTER 19 Spring and Struts . . . . . . . . . . . . . . . . . . . . . . . .679
PART 7  Appendixes
APPENDIX A Testing with Spring . . . . . . . . . . . . . . . . . . . . . . .697
APPENDIX B The Spring Rich Project . . . . . . . . . . . . . . . . . . . . .711
APPENDIX C Spring IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . 729
APPENDIX D The Future of Spring . . . . . . . . . . . . . . . . . . . . . . 743
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767


java鍏夌幆 2005-03-24 19:03 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 日韩少妇内射免费播放| 在线观看亚洲网站| 无码免费一区二区三区免费播放| 国产91久久久久久久免费| 国产成人亚洲精品无码AV大片| 在线观看无码的免费网站| 亚洲va中文字幕| 亚洲Aⅴ无码一区二区二三区软件 亚洲AⅤ视频一区二区三区 | 亚洲AV无码久久久久网站蜜桃| 19禁啪啪无遮挡免费网站| 亚洲一区中文字幕久久| 最近免费中文字幕大全免费| 亚洲精品视频在线| 精品亚洲成α人无码成α在线观看 | 日本在线看片免费人成视频1000| 亚洲欧洲第一a在线观看| 99re这里有免费视频精品| 亚洲美女一区二区三区| 免费看国产精品3a黄的视频| 亚洲精品无码av片| 精品亚洲视频在线观看| 一级毛片免费观看不卡视频| 67194在线午夜亚洲| 日本19禁啪啪无遮挡免费动图| 七次郎成人免费线路视频| 亚洲国产精品成人精品无码区| 999任你躁在线精品免费不卡| 亚洲午夜无码久久| 亚洲中文字幕无码专区| 欧洲精品99毛片免费高清观看| 亚洲五月综合缴情婷婷| 毛茸茸bbw亚洲人| 24小时免费看片| 精品特级一级毛片免费观看| 国产成人亚洲综合色影视| 亚洲黄色免费电影| 国产亚洲精品美女久久久久| 亚洲AV日韩AV天堂一区二区三区| 啦啦啦高清视频在线观看免费| 国产精品免费大片一区二区| 亚洲av日韩av综合|