

{"id":18935,"date":"2018-06-25T04:00:22","date_gmt":"2018-06-25T04:00:22","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=18935"},"modified":"2018-10-23T17:38:55","modified_gmt":"2018-10-23T12:08:55","slug":"spring-mvc-framework","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/","title":{"rendered":"Spring MVC Framework &#8211; Integration of MVC with Spring"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:1915,&quot;href&quot;:&quot;https:\\\/\\\/docs.spring.io\\\/spring\\\/docs\\\/current\\\/spring-framework-reference\\\/web.html&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20200916045019\\\/https:\\\/\\\/docs.spring.io\\\/spring\\\/docs\\\/current\\\/spring-framework-reference\\\/web.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-10 08:24:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-06 05:16:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-26 03:50:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 15:01:03&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-20 02:26:09&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-05-20 02:26:09&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<h2 class=\"western\">1. Objective<\/h2>\n<p>In our last tutorial, we discussed <strong><a href=\"https:\/\/data-flair.training\/blogs\/spring-logging\/\">Integration of Spring Logging with log4j<\/a><\/strong>\u00a0\u00a0In this article, we will learn about the Spring MVC Framework &#8211;\u00a0integration of MVC framework with the Spring Framework to develop an application. Using MVC framework you will develop flexible and loosely coupled Web App. You will also see a working example using Eclipse IDE.<br \/>\nSo, let&#8217;s start\u00a0Spring MVC Framework.<\/p>\n<div id=\"attachment_39376\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Spring-MVC-Framework-1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-39376\" class=\"size-full wp-image-39376\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Spring-MVC-Framework-1.jpg\" alt=\"Spring MVC Framework - Integration of MVC with Spring\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Spring-MVC-Framework-1.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Spring-MVC-Framework-1-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Spring-MVC-Framework-1-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Spring-MVC-Framework-1-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Spring-MVC-Framework-1-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Spring-MVC-Framework-1-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-39376\" class=\"wp-caption-text\">Spring MVC Framework &#8211; Integration of MVC with Spring<\/p><\/div>\n<h2 class=\"western\">2. Spring MVC Framework<\/h2>\n<p>The Spring MVC framework uses Model View Controller(MVC) architecture. The MVC pattern separates the several aspects of the application such as input logic, UI logic, and business logic. It also uses MVC ready components that are used for developing flexible and loosely coupled web applications.<br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/spring-framework-architecture\/\">Let&#8217;s read about Spring Framework Architecture with 4 Modules<\/a><\/strong><br \/>\nSpring MVC Framework is as follows:<\/p>\n<ul>\n<li>The Model encapsulates app data which generally contains<a href=\"https:\/\/data-flair.training\/blogs\/pojo-class-in-java\/\"><strong> POJO<\/strong><\/a>.<\/li>\n<li>The View is for rendering model data. Which in general generates HTML output that client browser can understand.<\/li>\n<li>The Controller processes user requests and builds the appropriate model. Then it passes it to the View for rendering.<\/li>\n<\/ul>\n<h3 class=\"western\">a. MVC Framework- The DispatcherServlet<\/h3>\n<p>The Spring MVC framework is made around DispatcherServlet which handles HTTP request and response. The following diagram illustrates the working of DispatcherServlet:<\/p>\n<div id=\"attachment_19355\" style=\"width: 564px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/img1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-19355\" class=\"wp-image-19355 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/img1.png\" alt=\"Spring MVC Framework\" width=\"554\" height=\"331\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/img1.png 554w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/img1-150x90.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/img1-300x179.png 300w\" sizes=\"auto, (max-width: 554px) 100vw, 554px\" \/><\/a><p id=\"caption-attachment-19355\" class=\"wp-caption-text\">Spring MVC Framework &#8211;\u00a0The DispatcherServlet<\/p><\/div>\n<p>The mentioned components HandlerMapping, Controller and ViewResolver are parts of WebApplicationContext an extension of ApplicationContext.<br \/>\nThe steps which are done to an incoming HTTP request to DispatcherServlet:<\/p>\n<ul>\n<li>DispatcherServlet consults HandlerMapping to call Controller after receiving HTTP request.<\/li>\n<li>The Controller takes request and calls appropriate methods based on GET and POST. The method will then set model data based on business logic. It also returns view name to DispatcherServlet.<\/li>\n<li>The ViewResolver of DispatcherServlet picks up defined view for a request.<\/li>\n<li>After the view gets finalized DispatcherServlet passes model data to view. This is then rendered on the browser.<\/li>\n<\/ul>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/spring-jdbc\/\">Let&#8217;s Know about Spring JDBC Framework &#8211; JDBC Template with Eclipse IDE<\/a><\/strong><\/p>\n<h3 class=\"western\">b. Required Configuration<\/h3>\n<p>Using URL mapping in web.xml map the requests that you want DispatcherServlet to handle.<br \/>\nConsider the below example for mapping fir HelloWeb DispatcherServlet:<\/p>\n<pre class=\"EnlighterJSRAW\">&lt;web-app id = \"WebApp_ID\" version = \"2.4\"\r\nxmlns = \"http:\/\/java.sun.com\/xml\/ns\/j2ee\"\r\nxmlns:xsi = \"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\nxsi:schemaLocation = \"http:\/\/java.sun.com\/xml\/ns\/j2ee\r\nhttp:\/\/java.sun.com\/xml\/ns\/j2ee\/web-app_2_4.xsd\"&gt;\r\n&lt;display-name&gt;Spring MVC Application&lt;\/display-name&gt;\r\n&lt;servlet&gt;\r\n&lt;servlet-name&gt;HelloWeb&lt;\/servlet-name&gt;\r\n&lt;servlet-class&gt;\r\norg.springframework.web.servlet.DispatcherServlet\r\n&lt;\/servlet-class&gt;\r\n&lt;load-on-startup&gt;1&lt;\/load-on-startup&gt;\r\n&lt;\/servlet&gt;\r\n&lt;servlet-mapping&gt;\r\n&lt;servlet-name&gt;HelloWeb&lt;\/servlet-name&gt;\r\n&lt;url-pattern&gt;*.jsp&lt;\/url-pattern&gt;\r\n&lt;\/servlet-mapping&gt;\r\n&lt;\/web-app&gt;\r\n<\/pre>\n<p>Put the web.xml in WebContent\/WEB-INF directory of your web application. Upon initialization of HelloWeb DispatcherServlet, the framework will try to load application context from [servlet-name]-servlet.xml present in WEB_INFdirectory.<br \/>\nIf you don\u2019t want [servlet-name]-servlet.xml as default filename and WebINF as default location add the ContextLoaderListener in your web.xml as:<\/p>\n<pre class=\"EnlighterJSRAW\">&lt;web-app...&gt;\r\n&lt;!-------- DispatcherServlet definition goes here-----&gt;\r\n....\r\n&lt;context-param&gt;\r\n&lt;param-name&gt;contextConfigLocation&lt;\/param-name&gt;\r\n&lt;param-value&gt;\/WEB-INF\/HelloWeb-servlet.xml&lt;\/param-value&gt;\r\n&lt;\/context-param&gt;\r\n&lt;listener&gt;\r\n&lt;listener-class&gt;\r\norg.springframework.web.context.ContextLoaderListener\r\n&lt;\/listener-class&gt;\r\n&lt;\/listener&gt;\r\n&lt;\/web-app&gt;<\/pre>\n<p>Following is the required config for Hello-Web-servlet.xml present in WEB-INF directory:<\/p>\n<pre class=\"EnlighterJSRAW\">&lt;beans xmlns = \"http:\/\/www.springframework.org\/schema\/beans\"\r\nxmlns:context = \"http:\/\/www.springframework.org\/schema\/context\"\r\nxmlns:xsi = \"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\nxsi:schemaLocation = \"http:\/\/www.springframework.org\/schema\/beans\r\nhttp:\/\/www.springframework.org\/schema\/beans\/spring-beans-3.0.xsd\r\nhttp:\/\/www.springframework.org\/schema\/context\r\nhttp:\/\/www.springframework.org\/schema\/context\/spring-context-3.0.xsd\"&gt;\r\n&lt;context:component-scan base-package = \"com.example\" \/&gt;\r\n&lt;bean class = \"org.springframework.web.servlet.view.InternalResourceViewResolver\"&gt;\r\n&lt;property name = \"prefix\" value = \"\/WEB-INF\/jsp\/\" \/&gt;\r\n&lt;property name = \"suffix\" value = \".jsp\" \/&gt;\r\n&lt;\/bean&gt;\r\n&lt;\/beans&gt;<\/pre>\n<p>Some points about HelloWeb-servlet.xml:<\/p>\n<ul>\n<li>The [servlet-name]-servlet.xml will be used for creating the beans defined and overriding the definitions of any beans with the same name.<\/li>\n<li>The tag <strong>&lt;context:component-scan..&gt;<\/strong> is for activating Spring MVC annotation scanning capability.<\/li>\n<li>The InternalResourceViewResolver has rules defined to resolve view naming.<\/li>\n<\/ul>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/spring-custom-event\/\">Do you about How to Design Customised Events in Spring Framework<\/a><\/strong><br \/>\nNow you will see how to develop MVC components Controller and View.<\/p>\n<h3 class=\"western\">c. Creating the Controller<\/h3>\n<p>Here you will see how to define the controller. The @RequestMapping is for mapping a URL to handler method or to an entire class. The @Controller indicates a particular class serving a role of controller. Let\u2019s see the example of defining controller:<\/p>\n<pre class=\"EnlighterJSRAW\">@Controller\r\npublic class HelloController {\r\n@RequestMapping(value = \"\/hello\", method = RequestMethod.GET)\r\npublic String printHello(ModelMap model) {\r\nmodel.addAttribute(\"message\", \"Hello Spring MVC Framework!\");\r\nreturn \"hello\";\r\n}\r\n}<\/pre>\n<p>Some things you should keep in mind for defining the controller. You should define business logic inside service method. Also, based on business logic you should create a model within this method which in this example a model is created with its attribute \u201cmessage\u201d. A defined service method can return the name of view as a string which will be used for rendering the model. In the example above \u201chello\u201d is returned as View name.<\/p>\n<h3 class=\"western\">d. Creating the JSP Views<\/h3>\n<p>The Spring MVC framework has many types of views such as JSP, HTML, XML, XSLT etc. Here you will see JSP for creating View which is a general case. The example is defined below in which ${message} is the attribute setup in the controller.<\/p>\n<pre class=\"EnlighterJSRAW\">&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;Hello Spring MVC&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;h2&gt;${message}&lt;\/h2&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>So, this was all about Spring MVC Framework. Hope you like our explanation.<\/p>\n<h2 class=\"western\">3. Conclusion<\/h2>\n<p>Hence, in this session of Spring MVC framework, you learned about the MVC model of Spring which is used for developing Spring Web application. The topic was discussed by splitting the components of MVC framework which is Model, View, and Controller. Each component was discussed in detail with providing the code in Eclipse IDE. The code developed was the HelloWorld Web application. At last, it gave you an idea how to integrate MVC framework with Spring. Furthermore, if have any query, feel free to ask in the comment section.<br \/>\nRelated Topic-\u00a0<strong><a href=\"https:\/\/data-flair.training\/blogs\/spring-boot-cli\/\">Spring Boot CLI <\/a><\/strong><br \/>\n<strong><a href=\"https:\/\/docs.spring.io\/spring\/docs\/current\/spring-framework-reference\/web.html\">For reference\u00a0<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Objective In our last tutorial, we discussed Integration of Spring Logging with log4j\u00a0\u00a0In this article, we will learn about the Spring MVC Framework &#8211;\u00a0integration of MVC framework with the Spring Framework to develop&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":39376,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64],"tags":[702,2815,2969,3976,8771,8977,8978,8980,13345,13346,15384,15467],"class_list":["post-18935","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spring","tag-andlermapping","tag-components-of-mvc-framework","tag-controller","tag-dispatcherservlet","tag-model-view-controller","tag-mvc-architecture","tag-mvc-framework","tag-mvc-model-of-spring","tag-spring-mvc-framework","tag-spring-mvc-model","tag-viewresolver","tag-webapplicationcontext"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring MVC Framework - Integration of MVC with Spring - DataFlair<\/title>\n<meta name=\"description\" content=\"Spring MVC Framework- Integration of MVC with Spring Framework, Model View Controller(MVC) architecture, DispatcherServlet, Required Configuration\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring MVC Framework - Integration of MVC with Spring - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Spring MVC Framework- Integration of MVC with Spring Framework, Model View Controller(MVC) architecture, DispatcherServlet, Required Configuration\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-25T04:00:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-10-23T12:08:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Spring-MVC-Framework-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring MVC Framework - Integration of MVC with Spring - DataFlair","description":"Spring MVC Framework- Integration of MVC with Spring Framework, Model View Controller(MVC) architecture, DispatcherServlet, Required Configuration","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/","og_locale":"en_US","og_type":"article","og_title":"Spring MVC Framework - Integration of MVC with Spring - DataFlair","og_description":"Spring MVC Framework- Integration of MVC with Spring Framework, Model View Controller(MVC) architecture, DispatcherServlet, Required Configuration","og_url":"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-06-25T04:00:22+00:00","article_modified_time":"2018-10-23T12:08:55+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Spring-MVC-Framework-1.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Spring MVC Framework &#8211; Integration of MVC with Spring","datePublished":"2018-06-25T04:00:22+00:00","dateModified":"2018-10-23T12:08:55+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/"},"wordCount":803,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Spring-MVC-Framework-1.jpg","keywords":["andlerMapping","Components of MVC framework","Controller","DispatcherServlet","Model View Controller","MVC Architecture","MVC Framework","MVC model of Spring","Spring MVC Framework","Spring MVC model","ViewResolver","WebApplicationContext"],"articleSection":["Spring Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/","url":"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/","name":"Spring MVC Framework - Integration of MVC with Spring - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Spring-MVC-Framework-1.jpg","datePublished":"2018-06-25T04:00:22+00:00","dateModified":"2018-10-23T12:08:55+00:00","description":"Spring MVC Framework- Integration of MVC with Spring Framework, Model View Controller(MVC) architecture, DispatcherServlet, Required Configuration","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Spring-MVC-Framework-1.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/06\/Spring-MVC-Framework-1.jpg","width":1200,"height":628,"caption":"Spring MVC Framework - Integration of MVC with Spring"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/spring-mvc-framework\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Spring Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/spring\/"},{"@type":"ListItem","position":3,"name":"Spring MVC Framework &#8211; Integration of MVC with Spring"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/18935","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=18935"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/18935\/revisions"}],"predecessor-version":[{"id":39377,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/18935\/revisions\/39377"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/39376"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=18935"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=18935"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=18935"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}