title: How do I set Spring properties in run configuration in Intellij
body: <p>I have the following code...</p>
  
  <pre><code>@Service
  public class PropertiesService {
      ...
      @Value("external.config.active") private String useExternalConfig
  </code></pre>
  
  <p>So in intellij I set the VM Options to...</p>
  
  <pre><code>-Dexternal.config.active=true
  </code></pre>
  
  <p>But when I debug in the application <code>this.useExternalConfig.equals("external.config.active")</code> is true.</p>
  
  <p>What do I have to do to set a Spring property in the run configuration for IJ</p>
  
  <p><strong>Update</strong> I see it being supplied in the java command...</p>
  
  <blockquote>
    <p>/.../java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:53192,suspend=y,server=n <strong>-Dexternal.config.active=true</strong> -javaagent:/.../Caches/IdeaIC2018.1/groovyHotSwap/gragent.jar -javaagent:/.../Caches/IdeaIC2018.1/captureAgent/debugger-agent.jar=file:/private/var/folders/3d/5f6dvvs573zg3ydvxbd0b0h40000gn/T/capture2.props -Dfile.encoding=UTF-8 -classpath</p>
  </blockquote>