vscode-java
vscode-java copied to clipboard
The devtools package in spring boot is not doing an automatic restart.
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
- Create a java gradle project with spring initializer (add jpa, lombok, mysql driver, web, devtools dependencies)
- Install the spring boot extension from vscode
- Open the spring boot project folder in vscode
- Change the application.properties file to application.yml
- Start debugging
- Edit and save the java code
- 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
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
}
}
This should be related to enable autobuild support within the Gradle build server, see https://github.com/microsoft/vscode-gradle/issues/1449.
// cc: @jdneo