title: How does SpringBoot devtools detect application's running environment?
body: <p>In my appllicaiton, I add SpringBoot devtools to improve the development speed.</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;
      &lt;optional&gt;true&lt;/optional&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p></p>
  
  <p>In its <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html" rel="noreferrer">official document</a>, it says</p>
  
  <blockquote>
    <p>Developer tools are automatically disabled when running a fully packaged application. If your application is launched from java -jar or if it is started from a special classloader, then it is considered a “production application”. </p>
  </blockquote>
  
  <p>The application is launched from java -jar in Production. But how is it lanched in Intellij idea while in development?</p>