Skip to content

Commit 015d8a1

Browse files
authored
fix: The default for livereload in Spring Boot 4 RC1 is false (#22636)
1 parent faafb83 commit 015d8a1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

vaadin-spring/src/main/java/com/vaadin/flow/spring/SpringDevToolsPortHandler.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ public class SpringDevToolsPortHandler implements EnvironmentPostProcessor {
3434
@Override
3535
public void postProcessEnvironment(ConfigurableEnvironment environment,
3636
SpringApplication application) {
37-
// Only set the port if livereload is enabled (defaults to true when
38-
// DevTools is present)
37+
// Only set the port if livereload is enabled
3938
boolean liveReloadEnabled = environment.getProperty(
40-
SPRING_DEVTOOLS_LIVERELOAD_ENABLED, Boolean.class, true);
39+
SPRING_DEVTOOLS_LIVERELOAD_ENABLED, Boolean.class, false);
4140

4241
if (!liveReloadEnabled) {
4342
return;

vaadin-spring/src/test/java/com/vaadin/flow/spring/SpringDevToolsPortHandlerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ public void setUp() {
3737

3838
@Test
3939
public void liveReloadEnabled_portIsAssigned() {
40-
// Arrange: livereload enabled (default), no port set
40+
// Arrange: livereload explicitly enabled, no port set
4141
Mockito.when(environment.getProperty(
42-
"spring.devtools.livereload.enabled", Boolean.class, true))
42+
"spring.devtools.livereload.enabled", Boolean.class, false))
4343
.thenReturn(true);
4444
Mockito.when(environment.getProperty("spring.devtools.livereload.port"))
4545
.thenReturn(null);
@@ -66,7 +66,7 @@ public void liveReloadEnabled_portIsAssigned() {
6666
public void liveReloadDisabled_portIsNotAssigned() {
6767
// Arrange: livereload explicitly disabled, no port set
6868
Mockito.when(environment.getProperty(
69-
"spring.devtools.livereload.enabled", Boolean.class, true))
69+
"spring.devtools.livereload.enabled", Boolean.class, false))
7070
.thenReturn(false);
7171
Mockito.when(environment.getProperty("spring.devtools.livereload.port"))
7272
.thenReturn(null);

0 commit comments

Comments
 (0)