Posts

Showing posts with the label Spring Boot

Spring vs Spring Boot

  Programmers need not start from scratch when they want to work on some projects. They have tools designed to help them in the development process. One of the most helpful tools is the   Framework . Using a software framework to develop applications lets us focus on the high-level functionality of the application instead of any low-level functionality which is taken care of by the framework itself. Since software frameworks are often built, tested, and optimized by several experienced software engineers and programmers, they are flexible, powerful, and efficient. What is the Spring Framework? Spring  is a  lightweight framework  that makes the development of the  JavaEE  application easier. Its called a lightweight framework because it tries to be as invisible as possible which is achieved by following  POJO-oriented  development. The Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise applications — on any kind of deployment

Use of DispatcherServlet in Spring MVC Framework

Image
If you have worked with Spring MVC then you should know   what is a DispatcherServlet?   It's actually the heart of Spring MVC, precisely the C of MVC design pattern or Controller. Every single web request which is supposed to be processed by Spring MVC goes through DispatcherServlet. In general, it's an implementation of Front Controller Pattern which provides a single point of entry in your application. It handles all incoming requests. It is also the bridge between Java and Spring. Btw, the   DispatcherServlet   is like any other Servlet is declared in the web.xml with a URL pattern but the only special thing is that the URL pattern for dispatcher servlet is enough to map every single web request to DispathcherServlert. It is responsible for request handling by delegating requests to additional components of Spring MVC e.g. actual controller classes i.e. those which are annotated using   @Controller   or   @RestController   (in case of RESTful Web Services), Views, View Reso