Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

8.9. Summary

This chapter showed how annotation-driven development can save you the effort of maintaining the application configuration in separate configuration files. You saw how various Spring features can be accessed using annotations to simplify portlet development. For instance, the classpath-scanning feature can autoregister Spring components, JSR 303’s @Valid annotation can validate objects, and other annotations can map portlet requests to handlers, store model attributes in the handler’s conversational session, autowire objects by type or by name, and so on. The example Book Catalog portlet showed how these features can be combined together to build a multipage portlet. We also looked at how Spring’s TestContext framework simplifies performing unit and integration testing of controllers.

In the next chapter, we’ll look at how Spring simplifies interacting with a database.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial