Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
highspeeder opened this issue Nov 15, 2023 · 2 comments · Fixed by microsoft/java-debug#555
Closed

Comments

@highspeeder
Copy link

highspeeder commented Nov 15, 2023

[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 highspeeder changed the title auto restart not working in spring boot devtools The devtools package in spring boot is not doing an automatic restart. Nov 15, 2023
@miyaogenta
Copy link

miyaogenta commented Nov 18, 2023

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
    }
}

@testforstephen
Copy link
Collaborator

This should be related to enable autobuild support within the Gradle build server, see microsoft/vscode-gradle#1449.

// cc: @jdneo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants