Mastering Spring MVC 4

Packt Publishing Limited
  • 1. Auflage
  • |
  • erschienen am 14. September 2015
  • |
  • 320 Seiten
E-Book | ePUB mit Adobe DRM | Systemvoraussetzungen
978-1-78398-239-4 (ISBN)
Gain expertise in designing real-world web applications using the Spring MVC frameworkAbout This BookDesign your own Spring web applications using tools such as Spring Boot and Spring Tool SuiteSecure your developments with easy-to-write, reliable unit and end-to-end testsDeploy your application on the cloud for free and invite the whole world to seeWho This Book Is ForThis book is perfect for developers who are familiar with the fundamentals of Spring programming and are eager to deepen their web development skills. Prior knowledge of the Spring MVC framework is recommended.What You Will LearnSet up your own web application using Spring Boot and Spring Tool SuiteDiscover the MVC architecture and the different tools along with navigating between viewsDesign complex advanced-level forms and validate the modelCraft a RESTful application with a meaningful API and error messagesCreate maintainable unit and acceptance testsSecure your application while allowing it to scaleOptimize your requests with caching, ETags, and asynchronous responsesDeploy the web application to the cloud in a snapIn DetailSpring MVC is the ideal tool to build modern web applications on the server side. With the arrival of Spring Boot, developers can really focus on the code and deliver great value, leveraging the rich Spring ecosystem with minimal configuration.Spring makes it simple to create RESTful applications, interact with social services, communicate with modern databases, secure your system, and make your code modular and easy to test. It is also easy to deploy the result on different cloud providers.Mastering Spring MVC will take you on a journey from developing your own web application to uploading it on the cloud.You begin by generating your own Spring project using Spring Tool suite and Spring Boot.As you develop an advanced-level interactive application that can handle file uploads as well as complex URLs, you will dive into the inner workings of Spring MVC and the principles of modern web architectures.You will then test, secure, and optimize your Spring web application and design RESTful services that will be consumed on the frontend.Finally, when everything is ready, you will release your application on a cloud provider and invite everyone to see.Style and approachAn iterative hands-on approach in a conversational and easy-to-follow style. Each chapter will improve on the work done in the previous one until the application is ready to be released.
  • Englisch
  • Birmingham
  • |
  • Großbritannien
978-1-78398-239-4 (9781783982394)
178398239X (178398239X)
weitere Ausgaben werden ermittelt
Geoffroy Warin has been programming since he was 10. A firm believer in the Software Craftsmanship movement and open source initiatives, he is a developer by choice and conviction. He has been working on the conception of enterprise-level web applications in Java and JavaScript throughout the course of his career.
At ease with both the backend and frontend, Geoffroy has a strong focus on Clean Code and testability. He believes that developers should strive for readable code that delivers constant value to their customers.
Pair programming and mentorship are his primary tools to promote a test-driven development approach and create great software designs.
He also teaches courses on Java web stacks and is a Groovy and Spring enthusiast.
Lately, he has been part of the reviewing team for Learning Spring Boot and Spring Boot Cookbook, both by Packt Publishing, which cover the latest major additions to the Spring ecosystem.
Check out his blog at and his Twitter account at for fresh Spring and JavaScript programming tips.
  • Cover
  • Copyright
  • Credits
  • About the Author
  • About the Reviewers
  • Table of Contents
  • Preface
  • Chapter 1: Setting Up a Spring Web Application in No Time
  • Getting started with Spring Tool Suite
  • Getting started with IntelliJ
  • Getting started with
  • Getting started with the command line
  • Let's get started
  • The Gradle build
  • Let me see the code!
  • Spring Boot behind the curtains
  • The dispatcher and multipart configuration
  • The view resolver, static resources, and locale configuration
  • Error and encoding configuration
  • Embedded Servlet container (Tomcat) configuration
  • The HTTP port
  • The SSL configuration
  • Other configurations
  • Summary
  • Chapter 2: Mastering the MVC Architecture
  • The MVC architecture
  • MVC critics and best practices
  • Anemic Domain Model
  • Learning from the sources
  • Spring MVC 1-0-1
  • Using Thymeleaf
  • Our first page
  • Spring MVC architecture
  • DispatcherServlet
  • Passing data to the view
  • Spring Expression Language
  • Getting data with a request parameter
  • Enough Hello Worlds, let's fetch tweets!
  • Registering your application
  • Setting up Spring Social Twitter
  • Accessing Twitter
  • Java 8 streams and lambdas
  • Material design with WebJars
  • Using layouts
  • Navigation
  • The check point
  • Summary
  • Chapter 3: Handling Forms and Complex URL Mapping
  • The profile page - a form
  • Validation
  • Customize validation messages
  • Custom annotation for validation
  • Internationalization
  • Changing the locale
  • Translating the application text
  • A list in a form
  • Client validation
  • The check point
  • Summary
  • Chapter 4: File Upload and Error Handling
  • Uploading a file
  • Writing an image to the response
  • Managing upload properties
  • Displaying the uploaded picture
  • Handling file upload errors
  • Translating the error messages
  • Placing the profile in a session
  • Custom error pages
  • URL mapping with matrix variables
  • Putting it together
  • The check point
  • Summary
  • Chapter 5: Crafting a RESTful Application
  • What is REST?
  • Richardson's maturity model
  • Level 0 - HTTP
  • Level 1 - Resources
  • Level 2 - HTTP verbs
  • Level 3 - Hypermedia controls
  • API versioning
  • Useful HTTP codes
  • Client is the king
  • Debugging a RESTful API
  • A JSON formatting extension
  • A RESTful client in your browser
  • httpie
  • Customizing the JSON output
  • A user management API
  • Status codes and exception handling
  • Status code with ResponseEntity
  • Status codes with exceptions
  • Documentation with Swagger
  • Generating XML
  • The check point
  • Summary
  • Chapter 6: Securing Your Application
  • Basic authentication
  • Authorized users
  • Authorized URLs
  • Thymeleaf security tags
  • The login form
  • Twitter authentication
  • Setting up social authentication
  • Explanation
  • Distributed sessions
  • SSL
  • Generating a self-signed certificate
  • The easy way
  • The dual way
  • Behind a secured server
  • The check point
  • Summary
  • Chapter 7: Leaving Nothing to Luck - Unit Tests and Acceptance Tests
  • Why should I test my code?
  • How should I test my code?
  • Test-driven development
  • The unit tests
  • The right tools for the job
  • The acceptance tests
  • Our first unit test
  • Mocks and stubs
  • Mocking with Mockito
  • Stubbing our beans while testing
  • Should I use mocks or stubs?
  • Unit testing REST controllers
  • Testing the authentication
  • Writing acceptance tests
  • The Gradle configuration
  • Our first FluentLenium test
  • Page Objects with FluentLenium
  • Making our tests more Groovy
  • Unit tests with Spock
  • Integration tests with Geb
  • Page Objects with Geb
  • The check point
  • Summary
  • Chapter 8: Optimizing Your Requests
  • A production profile
  • Gzipping
  • Cache control
  • Application cache
  • Cache invalidation
  • Distributed cache
  • Async methods
  • ETags
  • WebSockets
  • The check point
  • Summary
  • Chapter 9: Deploying Your Web Application to the Cloud
  • Choosing your host
  • Cloud Foundry
  • OpenShift
  • Heroku
  • Deploying your web application to Pivotal Web Services
  • Installing the Cloud Foundry CLI tools
  • Assembling the application
  • Activating Redis
  • Deploying your web application on Heroku
  • Installing the tools
  • Setting up the application
  • Gradle
  • Procfile
  • A Heroku profile
  • Running your application
  • Activating Redis
  • Improving your application
  • Summary
  • Chapter 10: Beyond Spring Web
  • The Spring ecosystem
  • Core
  • Execution
  • Data
  • Other noteworthy projects
  • The deployment
  • Docker
  • Single Page Applications
  • The players
  • The future
  • Going stateless
  • Summary
  • Index

Dateiformat: EPUB
Kopierschutz: Adobe-DRM (Digital Rights Management)


Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat EPUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Weitere Informationen finden Sie in unserer E-Book Hilfe.

Download (sofort verfügbar)

40,53 €
inkl. 19% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe DRM
siehe Systemvoraussetzungen
E-Book bestellen

Unsere Web-Seiten verwenden Cookies. Mit der Nutzung dieser Web-Seiten erklären Sie sich damit einverstanden. Mehr Informationen finden Sie in unserem Datenschutzhinweis. Ok