mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Merge branch '2.4.x'
Closes gh-24580
This commit is contained in:
commit
f4ce82de40
@ -119,7 +119,8 @@ public class SpringBootContextLoader extends AbstractContextLoader {
|
|||||||
application.setWebApplicationType(WebApplicationType.NONE);
|
application.setWebApplicationType(WebApplicationType.NONE);
|
||||||
}
|
}
|
||||||
application.setInitializers(initializers);
|
application.setInitializers(initializers);
|
||||||
return application.run(getArgs(config));
|
String[] args = SpringBootTestArgs.get(config.getContextCustomizers());
|
||||||
|
return application.run(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -140,19 +141,6 @@ public class SpringBootContextLoader extends AbstractContextLoader {
|
|||||||
return new StandardEnvironment();
|
return new StandardEnvironment();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the application arguments to use. If no arguments are available, return an
|
|
||||||
* empty array.
|
|
||||||
* @param config the source context configuration
|
|
||||||
* @return the application arguments to use
|
|
||||||
* @deprecated since 2.2.7
|
|
||||||
* @see SpringApplication#run(String...)
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
protected String[] getArgs(MergedContextConfiguration config) {
|
|
||||||
return SpringBootTestArgs.get(config.getContextCustomizers());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setActiveProfiles(ConfigurableEnvironment environment, String[] profiles) {
|
private void setActiveProfiles(ConfigurableEnvironment environment, String[] profiles) {
|
||||||
environment.setActiveProfiles(profiles);
|
environment.setActiveProfiles(profiles);
|
||||||
// Also add as properties to override any application.properties
|
// Also add as properties to override any application.properties
|
||||||
|
Loading…
Reference in New Issue
Block a user