Subjects

All subjects Django Java Python React Spring Boot JavaScript PHP
Sign Up Free
Interview question

What is Spring Boot and how is it different from the Spring Framework? स्प्रिंग बूट क्या है और यह स्प्रिंग फ्रेमवर्क से कैसे अलग है?

Answer

Spring Boot is an opinionated extension of the Spring Framework that removes boilerplate configuration through auto-configuration, starter dependencies, and an embedded server, so you can build stand-alone, production-ready applications with minimal setup.

Spring Framework requires manual configuration of beans, dispatcher servlets, and XML or Java config. Spring Boot auto-configures sensible defaults based on the classpath, letting you override only what you need. It also bundles an embedded servlet container (Tomcat, Jetty, or Undertow), so apps run as a single executable JAR without deploying to an external server.

@SpringBootApplication
public class DemoApplication {
    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
}
AspectSpring FrameworkSpring Boot
ConfigurationManual (XML/Java)Auto-configured
ServerExternal deploymentEmbedded (Tomcat/Jetty)
Setup timeHigherMinimal

स्प्रिंग बूट, स्प्रिंग फ्रेमवर्क का एक ओपिनियनेटेड एक्सटेंशन है जो ऑटो-कॉन्फिगरेशन, स्टार्टर डिपेंडेंसीज़ और एम्बेडेड सर्वर के ज़रिए बॉयलरप्लेट कॉन्फिगरेशन हटा देता है, जिससे न्यूनतम सेटअप में स्टैंडअलोन, प्रोडक्शन-रेडी एप्लिकेशन बनाया जा सकता है।

स्प्रिंग फ्रेमवर्क में बीन्स, डिस्पैचर सर्वलेट और XML या Java कॉन्फिग को मैन्युअली सेट करना पड़ता है। स्प्रिंग बूट क्लासपाथ के आधार पर उचित डिफ़ॉल्ट्स को ऑटो-कॉन्फिगर करता है। इसमें एक एम्बेडेड सर्वलेट कंटेनर (Tomcat, Jetty या Undertow) भी शामिल होता है, इसलिए ऐप्स बिना बाहरी सर्वर के एक ही एक्ज़ीक्यूटेबल JAR के रूप में चलते हैं।

@SpringBootApplication
public class DemoApplication {
    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
}
पहलूस्प्रिंग फ्रेमवर्कस्प्रिंग बूट
कॉन्फिगरेशनमैन्युअल (XML/Java)ऑटो-कॉन्फिगर्ड
सर्वरबाहरी डिप्लॉयमेंटएम्बेडेड (Tomcat/Jetty)
सेटअप समयअधिकन्यूनतम

Was this answer clear?