use of org.springframework.context.support.GenericXmlApplicationContext in project BroadleafCommerce by BroadleafCommerce.
the class EntityConfiguration method configureMergedItems.
@PostConstruct
public void configureMergedItems() {
Set<Resource> temp = new LinkedHashSet<Resource>();
if (mergedEntityContexts != null && !mergedEntityContexts.isEmpty()) {
for (String location : mergedEntityContexts) {
temp.add(webApplicationContext.getResource(location));
}
}
if (entityContexts != null) {
for (Resource resource : entityContexts) {
temp.add(resource);
}
}
entityContexts = temp.toArray(new Resource[temp.size()]);
applicationcontext = new GenericXmlApplicationContext(entityContexts);
}
use of org.springframework.context.support.GenericXmlApplicationContext in project spring-security by spring-projects.
the class Sec2499Tests method methodExpressionHandlerInParentContextLoads.
@Test
public void methodExpressionHandlerInParentContextLoads() {
this.parent = new GenericXmlApplicationContext("org/springframework/security/config/method/sec2499/parent.xml");
this.child = new GenericXmlApplicationContext();
this.child.load("org/springframework/security/config/method/sec2499/child.xml");
this.child.setParent(this.parent);
this.child.refresh();
}
use of org.springframework.context.support.GenericXmlApplicationContext in project pinpoint by naver.
the class AlarmJobTest method main.
public static void main(String[] args) throws Exception {
GenericXmlApplicationContext applicationContext = new GenericXmlApplicationContext("/applicationContext-test.xml");
JobLauncherTestUtils testLauncher = applicationContext.getBean(JobLauncherTestUtils.class);
JobExecution jobExecution = testLauncher.launchJob(getParameters());
BatchStatus status = jobExecution.getStatus();
assertEquals(BatchStatus.COMPLETED, status);
applicationContext.close();
}
use of org.springframework.context.support.GenericXmlApplicationContext in project midpoint by Evolveum.
the class NinjaContext method setupRepositoryViaMidPointHome.
private void setupRepositoryViaMidPointHome(ConnectionOptions options) {
boolean connectRepo = !options.isOffline();
log.info("Initializing using midpoint home; {} repository connection", connectRepo ? "with" : "WITHOUT");
System.setProperty(MidpointConfiguration.MIDPOINT_SILENT_PROPERTY, "true");
String midpointHome = options.getMidpointHome();
System.setProperty(MidpointConfiguration.MIDPOINT_HOME_PROPERTY, midpointHome);
overrideRepoConfiguration(options);
GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
ctx.load(CTX_NINJA);
ctx.load(connectRepo ? CTX_MIDPOINT : CTX_MIDPOINT_NO_REPO);
ctx.refresh();
context = ctx;
midpointConfiguration = context.getBean(MidpointConfiguration.class);
repository = connectRepo ? context.getBean(REPOSITORY_SERVICE_BEAN, RepositoryService.class) : null;
auditService = connectRepo ? context.getBean(AUDIT_SERVICE_BEAN, AuditService.class) : null;
}
use of org.springframework.context.support.GenericXmlApplicationContext in project spring-framework by spring-projects.
the class JCacheNamespaceDrivenTests method cacheResolver.
@Test
public void cacheResolver() {
ConfigurableApplicationContext context = new GenericXmlApplicationContext("/org/springframework/cache/jcache/config/jCacheNamespaceDriven-resolver.xml");
DefaultJCacheOperationSource ci = context.getBean(DefaultJCacheOperationSource.class);
assertThat(ci.getCacheResolver()).isSameAs(context.getBean("cacheResolver"));
context.close();
}
Aggregations