coverpage
Spring MVC Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Time for action – heading
Reader feedback
Customer support
Chapter 1. Configuring a Spring Development Environment
Setting up Java
Time for action – installing JDK
Time for action – setting up environment variables
Configuring a build tool
Time for action – installing the Maven build tool
Installing a web server
Time for action – installing the Tomcat web server
Configuring a development environment
Time for action – installing Spring Tool Suite
Time for action – configuring Tomcat on STS
Time for action – configuring Maven on STS
Creating our first Spring MVC project
Time for action – creating a Spring MVC project in STS
Time for action – adding Spring jars to the project
Time for action – adding Java version properties in pom.xml
Time for action – adding a welcome page
Time for action – configuring the dispatcher servlet
Time for action – running the project
Summary
Chapter 2. Spring MVC Architecture – Architecting Your Web Store
The dispatcher servlet
Time for action – examining request mapping
The web application context
Time for action – understanding the web application context
The web application context configuration
View resolvers
Time for action – understanding InternalResourceViewResolver
Model View Controller
An overview of the Spring MVC request flow
The web application architecture
The domain layer
Time for action – creating a domain object
The persistence layer
Time for action – creating a repository object
The service layer
Time for action – creating a service object
An overview of the web application architecture
Summary
Chapter 3. Control Your Store with Controllers
Defining a controller
Time for action – adding class-level request mapping
The role of a controller in Spring MVC
Handler mapping
Using URI template patterns
Time for action – showing products based on category
Using matrix variables
Time for action – showing the products based on filter
Understanding request parameters
Time for action – adding the product details page
Time for action – implementing a master detail view
Summary
Chapter 4. Working with Spring Tag Libraries
Serving and processing forms
Time for action – serving and processing forms
Customizing data binding
Time for action – whitelisting form fields
Externalizing text messages
Time for action – externalizing messages
Using Spring Security tags
Time for action – adding a login page
Summary
Chapter 5. Working with View Resolver
Resolving views
The redirect view
Time for action – examining RedirectView
Serving static resources
Time for action – serving static resources
Time for action – adding images to the product detail page
The multipart request in action
Time for action – adding images to the product page
Using ContentNegotiatingViewResolver
Time for action – configuring ContentNegotiatingViewResolver
Working with the handler exception resolver
Time for action – adding the response status exception
Time for action – adding an exception handler
Summary
Chapter 6. Intercept Your Store with Interceptor
Working with interceptors
Time for action – configuring an interceptor
Internationalization (i18n)
Time for action – adding internationalization
Audit logging
Time for action – adding the data audit interceptor
Conditional redirecting
Time for action – intercepting offer page requests
Summary
Chapter 7. Validate Your Products with a Validator
Bean validation
Time for action – adding bean validation support
Custom validation with JSR-303 / bean validation
Time for action – adding custom validation support
Spring validation
Time for action – adding Spring validation
Time for action – combining Spring and bean validations
Summary
Chapter 8. Give REST to Your Application with Ajax
Introducing REST
Time for action – implementing RESTful web services
Time for action – consuming REST web services
Handling a web service in Ajax
Time for action – consuming REST web services via Ajax
Summary
Chapter 9. Apache Tiles and Spring Web Flow in Action
Working with Spring Web Flow
Time for action – implementing the order-processing service
Time for action – implementing the checkout flow
Time for action – creating views for every view state
Enhancing reusability through Apache Tiles
Time for action – creating views for every view state
Summary
Chapter 10. Testing Your Application
Unit testing
Time for action – unit-testing domain objects
Integration testing with the Spring Test Context framework
Time for action – testing the product validator
Time for action – testing the product controller
Time for action – testing REST controllers
Summary
Appendix A. Using the Gradle Build Tool
Installing Gradle
The Gradle build script for your project
Understanding the Gradle script
Appendix B. Pop Quiz Answers
Chapter 2 Spring MVC Architecture – Architecting Your Web Store
Chapter 3 Control Your Store with Controllers
Chapter 5 Working with View Resolver
Chapter 6 Intercept Your Store with Interceptor
Chapter 9 Apache Tiles and Spring Web Flow in Action
Index
更新时间:2021-07-16 11:26:07