title: Spring Boot, Gradle, and Visual Studio Code - Gradle bootRun Task Not Working Correctly
body: <p>I am attempting to use VS Code for my Spring Boot MVC Java application. I am using the Gradle build tool. I have installed the <a href="https://marketplace.visualstudio.com/items?itemName=redhat.java" rel="nofollow noreferrer">Java Language Support extension</a> from RedHat. Whenever I attempt to run my application using 'gradle bootRun' it never appears to stop executing buts stops at 75%. </p>
  
  <p><a href="https://i.stack.imgur.com/kwooD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kwooD.jpg" alt="enter image description here"></a></p>
  
  <p>Furthermore, whenever I stop the task  (<kbd>Ctrl</kbd>+<kbd>C</kbd>), I received a message </p>
  
  <blockquote>
    <p>the terminal process terminated with exit code: 2.</p>
  </blockquote>
  
  <p>I have included Spring Boot's development tools as a dependency, but the application does not appear to either restart or reload. I have tried using the <code>Force Java Recompilation</code> command provided by the Java extension, but without success.</p>
  
  <p>Has anyone been able to get Spring Boot, Gradle, and VS code to work well together?</p>
  
  <p>Thanks.</p>
  
  <p>EDIT:</p>
  
  <p>Sorry, I should have included my build.gradle file.</p>
  
  <pre><code>buildscript {
      ext {
          springBootVersion = '2.1.0.BUILD-SNAPSHOT'
      }
      repositories {
          mavenCentral()
          maven { url "https://repo.spring.io/snapshot" }
          maven { url "https://repo.spring.io/milestone" }
      }
      dependencies {
          classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
      }
  }
  
  
  plugins {
    id "org.kravemir.gradle.sass" version "1.2.2"
  }
  
  apply plugin: 'java'
  apply plugin: 'eclipse'
  apply plugin: 'org.springframework.boot'
  apply plugin: 'io.spring.dependency-management'
  
  group = 'com.midamcorp'
  version = '0.0.1-SNAPSHOT'
  sourceCompatibility = 10
  
  task ts(type:Exec) {
  workingDir "./"
    commandLine  'cmd', '/c', 'tscCompile.bat'    
  }
  
  bootRun {
    args = ["--spring.profiles.active=dev" ]
  }
  sass {
      main {
          srcDir = file("$projectDir/src/main/sass")
          outDir = file("$projectDir/src/main/resources/static/css")
          exclude = "**/_*.scss"
          minify = true
  
      }
  }
  
  repositories {
      mavenCentral()
      maven { url "https://repo.spring.io/snapshot" }
      maven { url "https://repo.spring.io/milestone" }
  }
  
  
  dependencies {
      compile('org.springframework.boot:spring-boot-starter-data-jpa')
      compile('org.springframework.boot:spring-boot-starter-mail')
      compile('org.springframework.boot:spring-boot-starter-thymeleaf')
      compile('org.postgresql:postgresql:42.2.4')
      compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.4.0-b180725.0427'
  
      compile('com.github.mkopylec:recaptcha-spring-boot-starter:2.2.0')
      compile('org.springframework.boot:spring-boot-starter-web')
      runtime('org.springframework.boot:spring-boot-devtools')
      testCompile('org.springframework.boot:spring-boot-starter-test')
  }
  </code></pre>