万本电子书0元读

万本电子书0元读

顶部广告

Spring MVC Beginner's Guide电子书

售       价:¥

9人正在读 | 0人评论 9.8

作       者:Amuthan G

出  版  社:Packt Publishing

出版时间:2014-06-25

字       数:103.4万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
A step-by-step pragmatic approach to web application development using Spring MVC, with relevant screenshots and concise explanations. This book is aimed at helping Java developers who want to teach themselves Spring MVC, even if they have no previous experience with Spring MVC. It would be helpful to have a bit of familiarity with basic servlet programming concepts, but no prior experience is required.
目录展开

Spring MVC Beginner's Guide

Table of Contents

Spring MVC Beginner's Guide

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why subscribe?

Free access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Time for action – heading

What just happened?

Pop quiz – heading

Have a go hero – heading

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

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

What just happened?

Time for action – configuring Maven on STS

Creating our first Spring MVC project

Time for action – creating a Spring MVC project in STS

What just happened?

Spring MVC dependencies

Time for action – adding Spring jars to the project

What just happened?

Time for action – adding Java version properties in pom.xml

A jump-start to MVC

Time for action – adding a welcome page

What just happened?

The dispatcher servlet

Time for action – configuring the dispatcher servlet

What just happened?

Deploying our project

Time for action – running the project

Summary

2. Spring MVC Architecture – Architecting Your Web Store

The dispatcher servlet

Time for action – examining request mapping

What just happened?

Pop quiz – request mapping

The web application context

Time for action – understanding the web application context

What just happened?

Pop quiz – the web application context

The web application context configuration

Pop quiz – web application context configuration

View resolvers

Time for action – understanding InternalResourceViewResolver

What just happened?

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

What just happened?

The persistence layer

Time for action – creating a repository object

What just happened?

The service layer

Time for action – creating a service object

What just happened?

Have a go hero – accessing the product domain object via a service

An overview of the web application architecture

Have a go hero – listing all our customers

Summary

3. Control Your Store with Controllers

Defining a controller

Time for action – adding class-level request mapping

What just happened?

Pop quiz – 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

What just happened?

Pop quiz – request path variable

Using matrix variables

Time for action – showing the products based on filter

What just happened?

Understanding request parameters

Time for action – adding the product details page

What just happened?

Pop quiz – the request parameter

Time for action – implementing a master detail view

What just happened?

Have a go hero – adding multiple filters to list products

Summary

4. Working with Spring Tag Libraries

Serving and processing forms

Time for action – serving and processing forms

What just happened?

Customizing data binding

Time for action – whitelisting form fields

What just happened?

Externalizing text messages

Time for action – externalizing messages

What just happened?

Using Spring Security tags

Time for action – adding a login page

What just happened?

Summary

5. Working with View Resolver

Resolving views

The redirect view

Time for action – examining RedirectView

What just happened?

Pop quiz – redirect view

Serving static resources

Time for action – serving static resources

What just happened?

Pop quiz – static view

Time for action – adding images to the product detail page

What just happened?

The multipart request in action

Time for action – adding images to the product page

What just happened?

Have a go hero – uploading product user manuals to the server

Using ContentNegotiatingViewResolver

Time for action – configuring ContentNegotiatingViewResolver

What just happened?

Working with the handler exception resolver

Time for action – adding the response status exception

What just happened?

Time for action – adding an exception handler

What just happened?

Summary

6. Intercept Your Store with Interceptor

Working with interceptors

Time for action – configuring an interceptor

What just happened?

Pop quiz – interceptor

Internationalization (i18n)

Time for action – adding internationalization

What just happened?

Have a go hero – fully internationalize the product detail page

Audit logging

Time for action – adding the data audit interceptor

What just happened?

Conditional redirecting

Time for action – intercepting offer page requests

What just happened?

Summary

7. Validate Your Products with a Validator

Bean validation

Time for action – adding bean validation support

What just happened?

Have a go hero – adding more validation in the add products page

Custom validation with JSR-303 / bean validation

Time for action – adding custom validation support

What just happened?

Have a go hero – adding custom validation to a category

Spring validation

Time for action – adding Spring validation

What just happened?

Time for action – combining Spring and bean validations

What just happened?

Have a go hero – adding Spring validation to the product image

Summary

8. Give REST to Your Application with Ajax

Introducing REST

Time for action – implementing RESTful web services

What just happened?

Time for action – consuming REST web services

What just happened?

Handling a web service in Ajax

Time for action – consuming REST web services via Ajax

What just happened?

Summary

9. Apache Tiles and Spring Web Flow in Action

Working with Spring Web Flow

Time for action – implementing the order-processing service

What just happened?

Time for action – implementing the checkout flow

What just happened?

Understanding the flow definition

Understanding the checkout flow

Pop quiz – web flow

Time for action – creating views for every view state

What just happened?

Have a go hero – adding a decision state

Enhancing reusability through Apache Tiles

Time for action – creating views for every view state

What just happened?

Pop quiz – Apache Tiles

Summary

10. Testing Your Application

Unit testing

Time for action – unit-testing domain objects

What just happened?

Have a go hero – adding tests for cart

Integration testing with the Spring Test Context framework

Time for action – testing the product validator

What just happened?

Time for action – testing the product controller

What just happened?

Time for action – testing REST controllers

What just happened?

Have a go hero – adding tests for the remaining REST methods

Summary

A. Using the Gradle Build Tool

Installing Gradle

The Gradle build script for your project

Understanding the Gradle script

B. Pop Quiz Answers

Chapter 2, Spring MVC Architecture – Architecting Your Web Store

Pop quiz – request mapping

Pop quiz – the web application context

Pop quiz – web application context configuration

Chapter 3, Control Your Store with Controllers

Pop quiz – class-level request mapping

Pop quiz – request path variable

Pop quiz – the request parameter

Chapter 5, Working with View Resolver

Pop quiz – redirect view

Pop quiz – static view

Chapter 6, Intercept Your Store with Interceptor

Pop quiz – interceptor

Chapter 9, Apache Tiles and Spring Web Flow in Action

Pop quiz – web flow

Pop quiz – Apache Tiles

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部