Subjects

All subjects Django Java Python React Spring Boot JavaScript PHP
Sign Up Free
Question 10 of 10 · Spring Boot Basics & Core Concepts
Interview question

What is Spring Boot DevTools and what does it do during development? स्प्रिंग बूट डेवटूल्स क्या है और यह डेवलपमेंट के दौरान क्या करता है?

Answer

Spring Boot DevTools is a development-time dependency that improves the development workflow through automatic application restarts when code on the classpath changes, LiveReload browser refresh support, and sensible development-time property defaults such as disabled template caching.

Restarts triggered by DevTools use two classloaders so only the changed classes are reloaded, making restarts much faster than a full JVM restart. DevTools is automatically excluded from a production build when packaged with Maven or Gradle, so it never ships to production by default.

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-devtools</artifactId>
  <optional>true</optional>
</dependency>

स्प्रिंग बूट डेवटूल्स एक डेवलपमेंट-टाइम डिपेंडेंसी है जो क्लासपाथ पर कोड बदलने पर ऑटोमैटिक ऐप्लिकेशन रीस्टार्ट, LiveReload ब्राउज़र रिफ्रेश सपोर्ट, और डेवलपमेंट-टाइम के उचित डिफ़ॉल्ट्स (जैसे टेम्पलेट कैशिंग बंद करना) के ज़रिए डेवलपमेंट वर्कफ़्लो को बेहतर बनाता है।

डेवटूल्स द्वारा ट्रिगर किए गए रीस्टार्ट दो क्लासलोडर्स का उपयोग करते हैं, जिससे केवल बदली हुई क्लासेज़ रीलोड होती हैं और रीस्टार्ट पूर्ण JVM रीस्टार्ट से कहीं तेज़ होता है। Maven या Gradle से पैकेज करने पर डेवटूल्स प्रोडक्शन बिल्ड से अपने आप बाहर हो जाता है।

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-devtools</artifactId>
  <optional>true</optional>
</dependency>

Was this answer clear?