private void load(Class<?> config, String... environment) { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); EnvironmentTestUtils.addEnvironment(context, environment); if (config != null) { context.register(config); } context.register(PropertyPlaceholderAutoConfiguration.class, CouchbaseAutoConfiguration.class, CouchbaseDataAutoConfiguration.class); context.refresh(); this.context = context; }
private void load(Class<?> config, String... environment) { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); EnvironmentTestUtils.addEnvironment(context, environment); if (config != null) { context.register(config); } context.register(PropertyPlaceholderAutoConfiguration.class, CouchbaseAutoConfiguration.class, CouchbaseDataAutoConfiguration.class, CouchbaseRepositoriesAutoConfiguration.class); context.refresh(); this.context = context; }