vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

The devtools package in spring boot is not doing an automatic restart.

Open highspeeder opened this issue 2 years ago • 2 comments
trafficstars

[provide a description of the issue]

Environment
  • Operating System: windows11
  • JDK version: 17
  • Visual Studio Code version: 1.84.2
  • Java extension version: Extension Pack for Java v0.25.15
Steps To Reproduce
  1. Create a java gradle project with spring initializer (add jpa, lombok, mysql driver, web, devtools dependencies)
  2. Install the spring boot extension from vscode
  3. Open the spring boot project folder in vscode
  4. Change the application.properties file to application.yml
  5. Start debugging
  6. Edit and save the java code
  7. Auto-restart should work fine at this point, but it doesn't.

[Please attach a sample project reproducing the error] Please attach logs

Current Result

When code changes, automatic restarts are not triggered.

Expected Result

When code changes, an automatic restart should be triggered.

Additional Informations

highspeeder avatar Nov 15 '23 19:11 highspeeder

I have same issue. Hot replace does not work well. Environment: JDK version: 17 Sprint Boot version: 3.1.5 gradle version: 8.4 Visual Studio Code version: 1.84.2

This is my build.gradle

plugins {
	id 'java'
	id 'org.springframework.boot' version '3.1.5'
	id 'io.spring.dependency-management' version '1.1.3'
}

group = 'com.example'
version = '0.0.1-SNAPSHOT'

java {
	sourceCompatibility = '17'
}

repositories {
	mavenCentral()
}

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter-web'
	developmentOnly 'org.springframework.boot:spring-boot-devtools'
	testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

tasks.named('bootBuildImage') {
	builder = 'paketobuildpacks/builder-jammy-base:latest'
}

tasks.named('test') {
	useJUnitPlatform()
}

configurations {
    developmentOnly
    runtimeClasspath {
        extendsFrom developmentOnly
    }
}

miyaogenta avatar Nov 18 '23 15:11 miyaogenta

This should be related to enable autobuild support within the Gradle build server, see https://github.com/microsoft/vscode-gradle/issues/1449.

// cc: @jdneo

testforstephen avatar Nov 20 '23 02:11 testforstephen