Skip to content

Commit f4ce82d

Browse files
committed
Merge branch '2.4.x'
Closes gh-24580
2 parents c78d037 + 327ce1b commit f4ce82d

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java

+2-14
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ else if (config instanceof ReactiveWebMergedContextConfiguration) {
119119
application.setWebApplicationType(WebApplicationType.NONE);
120120
}
121121
application.setInitializers(initializers);
122-
return application.run(getArgs(config));
122+
String[] args = SpringBootTestArgs.get(config.getContextCustomizers());
123+
return application.run(args);
123124
}
124125

125126
/**
@@ -140,19 +141,6 @@ protected ConfigurableEnvironment getEnvironment() {
140141
return new StandardEnvironment();
141142
}
142143

143-
/**
144-
* Return the application arguments to use. If no arguments are available, return an
145-
* empty array.
146-
* @param config the source context configuration
147-
* @return the application arguments to use
148-
* @deprecated since 2.2.7
149-
* @see SpringApplication#run(String...)
150-
*/
151-
@Deprecated
152-
protected String[] getArgs(MergedContextConfiguration config) {
153-
return SpringBootTestArgs.get(config.getContextCustomizers());
154-
}
155-
156144
private void setActiveProfiles(ConfigurableEnvironment environment, String[] profiles) {
157145
environment.setActiveProfiles(profiles);
158146
// Also add as properties to override any application.properties

0 commit comments

Comments
 (0)