|
|
|
|
@ -48,6 +48,7 @@ import org.springframework.aot.hint.RuntimeHints;
@@ -48,6 +48,7 @@ import org.springframework.aot.hint.RuntimeHints;
|
|
|
|
|
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 @@ class SpringApplicationTests {
@@ -221,8 +222,10 @@ class SpringApplicationTests {
|
|
|
|
|
|
|
|
|
|
@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 @@ class SpringApplicationTests {
@@ -1602,6 +1605,11 @@ class SpringApplicationTests {
|
|
|
|
|
private InaccessibleConfiguration() { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
|
String testMessage() { |
|
|
|
|
return "test"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static class SpyApplicationContext extends AnnotationConfigApplicationContext { |
|
|
|
|
|