@Before public void setup() { context = new AnnotationConfigApplicationContext(); context.setId("testDataFlowConfig"); context.register(DataFlowServerConfigurationTests.TestConfiguration.class, RedisAutoConfiguration.class, SecurityAutoConfiguration.class, DataFlowServerAutoConfiguration.class, DataFlowControllerAutoConfiguration.class, DataSourceAutoConfiguration.class, DataFlowServerConfiguration.class, PropertyPlaceholderAutoConfiguration.class, WebClientAutoConfiguration.class, HibernateJpaAutoConfiguration.class, WebConfiguration.class); environment = new StandardEnvironment(); propertySources = environment.getPropertySources(); }
private void load(Class<?> config, String... environment) { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); EnvironmentTestUtils.addEnvironment(ctx, environment); if (config != null) { ctx.register(config); } ctx.register(WebClientAutoConfiguration.class, InitializrStatsAutoConfiguration.class); ctx.refresh(); this.context = ctx; }
private void load(Class<?> config, String... environment) { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); EnvironmentTestUtils.addEnvironment(ctx, environment); if (config != null) { ctx.register(config); } ctx.register(WebClientAutoConfiguration.class, JacksonAutoConfiguration.class, InitializrAutoConfiguration.class); ctx.refresh(); this.context = ctx; }