Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Spring MVC Beginner's Guide

You're reading from   Spring MVC Beginner's Guide Unleash the power of the latest Spring MVC 4.x to develop a complete application

Arrow left icon
Product type Paperback
Published in Jul 2016
Last Updated in Feb 2025
Publisher
ISBN-13 9781785880636
Length 350 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
 Ganeshan Ganeshan
Author Profile Icon Ganeshan
Ganeshan
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Configuring a Spring Development Environment 2. Spring MVC Architecture – Architecting Your Web Store FREE CHAPTER 3. Control Your Store with Controllers 4. Working with Spring Tag Libraries 5. Working with View Resolver 6. Internalize Your Store with Interceptor 7. Incorporating Spring Security 8. Validate Your Products with a Validator 9. Give REST to Your Application with Ajax 10. Float Your Application with Web Flow 11. Template with Tiles 12. Testing Your Application Appendix A. Using the Gradle Build Tool 1. Appendix B. Pop Quiz Answers

Understanding the web application context configuration

The web application context configuration file (WebApplicationContextConfig.java) is nothing but a simple Java-based Spring bean configuration class. Spring will create beans (objects) for every bean definition mentioned in this class during the boot up of our application. If you open this web application context configuration file, you will find the following annotations on top of the class definition:

  • @Configuration: This indicates that a class declares one or more @Bean methods
  • @EnableWebMvc: Adding this annotation to an @Configuration class imports some special Spring MVC configuration
  • @ComponentScan: This specifies the base packages to scan for annotated components (beans)

The first annotation @Configuration indicates that this class declares one or more @Bean methods. If you remember, in the last section, I explained how we created a bean definition for InternalResourceViewResolver.

The second annotation is @EnableWebMvc. With this...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Spring MVC Beginner's Guide
You have been reading a chapter from
Spring MVC Beginner's Guide - Second Edition
Published in: Jul 2016
Publisher:
ISBN-13: 9781785880636
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $24.99/month. Cancel anytime
Modal Close icon
Modal Close icon