Browse Source

Polish test

Include at least a bean declaration to make sure the cglib proxy is
created
pull/44505/head
Stéphane Nicoll 11 months ago
parent
commit
d04620d5b3
  1. 7
      spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java

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

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 the original author or authors.
* Copyright 2012-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -1588,6 +1588,11 @@ class SpringApplicationTests { @@ -1588,6 +1588,11 @@ class SpringApplicationTests {
private InaccessibleConfiguration() {
}
@Bean
String testMessage() {
return "test";
}
}
static class SpyApplicationContext extends AnnotationConfigApplicationContext {

Loading…
Cancel
Save