From e69683769e893a727b2921787057641fbba271cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Fri, 28 Feb 2025 14:24:32 +0100 Subject: [PATCH] Start building against Spring Framework 6.1.18 snapshots See gh-44491 --- gradle.properties | 2 +- .../springframework/boot/SpringApplicationTests.java | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index c4724186ec70..70d658e33d08 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,7 +19,7 @@ mavenVersion=3.9.4 mockitoVersion=5.11.0 nativeBuildToolsVersion=0.10.5 snakeYamlVersion=2.2 -springFrameworkVersion=6.1.17 +springFrameworkVersion=6.1.18-SNAPSHOT springFramework60xVersion=6.0.23 tomcatVersion=10.1.36 diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java index 57a473052645..aaa1fdf0dda7 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java @@ -48,6 +48,7 @@ import org.springframework.aot.hint.predicate.RuntimeHintsPredicates; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCurrentlyInCreationException; +import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.UnsatisfiedDependencyException; import org.springframework.beans.factory.annotation.Autowired; @@ -221,8 +222,10 @@ void sourcesMustNotBeEmpty() { @Test void sourcesMustBeAccessible() { - assertThatIllegalArgumentException() + assertThatExceptionOfType(BeanDefinitionStoreException.class) .isThrownBy(() -> new SpringApplication(InaccessibleConfiguration.class).run()) + .havingRootCause() + .isInstanceOf(IllegalArgumentException.class) .withMessageContaining("No visible constructors"); } @@ -1602,6 +1605,11 @@ static class InaccessibleConfiguration { private InaccessibleConfiguration() { } + @Bean + String testMessage() { + return "test"; + } + } static class SpyApplicationContext extends AnnotationConfigApplicationContext {