Browse Source

Start building against Spring Framework 6.1.18 snapshots

See gh-44491
pull/42891/head
Stéphane Nicoll 10 months ago
parent
commit
e69683769e
  1. 2
      gradle.properties
  2. 10
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java

2
gradle.properties

@ -19,7 +19,7 @@ mavenVersion=3.9.4
mockitoVersion=5.11.0 mockitoVersion=5.11.0
nativeBuildToolsVersion=0.10.5 nativeBuildToolsVersion=0.10.5
snakeYamlVersion=2.2 snakeYamlVersion=2.2
springFrameworkVersion=6.1.17 springFrameworkVersion=6.1.18-SNAPSHOT
springFramework60xVersion=6.0.23 springFramework60xVersion=6.0.23
tomcatVersion=10.1.36 tomcatVersion=10.1.36

10
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java

@ -48,6 +48,7 @@ import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.predicate.RuntimeHintsPredicates; import org.springframework.aot.hint.predicate.RuntimeHintsPredicates;
import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.BeanCurrentlyInCreationException; import org.springframework.beans.factory.BeanCurrentlyInCreationException;
import org.springframework.beans.factory.BeanDefinitionStoreException;
import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.UnsatisfiedDependencyException; import org.springframework.beans.factory.UnsatisfiedDependencyException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -221,8 +222,10 @@ class SpringApplicationTests {
@Test @Test
void sourcesMustBeAccessible() { void sourcesMustBeAccessible() {
assertThatIllegalArgumentException() assertThatExceptionOfType(BeanDefinitionStoreException.class)
.isThrownBy(() -> new SpringApplication(InaccessibleConfiguration.class).run()) .isThrownBy(() -> new SpringApplication(InaccessibleConfiguration.class).run())
.havingRootCause()
.isInstanceOf(IllegalArgumentException.class)
.withMessageContaining("No visible constructors"); .withMessageContaining("No visible constructors");
} }
@ -1602,6 +1605,11 @@ class SpringApplicationTests {
private InaccessibleConfiguration() { private InaccessibleConfiguration() {
} }
@Bean
String testMessage() {
return "test";
}
} }
static class SpyApplicationContext extends AnnotationConfigApplicationContext { static class SpyApplicationContext extends AnnotationConfigApplicationContext {

Loading…
Cancel
Save