Revision
- Spring MVC Flow, Concepts, and Implementation Steps
- Understand and use:
- Model Attributes
ModelAndView
Model
Map
- Request Parameters
- Spring MVC Hibernate Integration (Without Spring Boot):
- Layers: Controller, Service, DAO, Entity, DB
- Task: List Restaurants
- Identify the efforts of extensive configuration.
- Solution to reduce configuration efforts:
- Use Spring Boot for MVC-based web apps (monolithic).
- Project Technology: MVC Flow with concepts and steps.
1. Integration of Spring MVC with Hibernate
(Refer to flow diagram, code, and steps)
1.1 Spring MVC Flow Diagram
- Describes the request-response lifecycle in a Spring MVC application (as detailed in the "Spring MVC Flow.txt" document).
- Client Request → DispatcherServlet → Handler Mapping → Controller → Model and View → View Resolution → View Rendering → Response.
1.2 Detailed Controller-Service-DAO-Entities-DB Diagram
- Illustrates the interaction between:
- Controller: Handles HTTP requests and coordinates with the Service layer.
- Service: Contains business logic and interacts with the DAO layer.
- DAO: Manages database operations using Hibernate.
- Entities: Java classes mapped to database tables.
- DB: The underlying database.
2. What Happens Internally When Deploying a Spring MVC Hibernate-Based Web App on a Web Server?
2.1 Web Container (WC) Starts the Lifecycle of DispatcherServlet (D.S)
- The web server initializes the DispatcherServlet, which acts as the front controller.
2.2 In init()
Method