use of org.mule.runtime.config.internal.SpringXmlConfigurationBuilder in project mule by mulesoft.
the class SpringArtifactConfigurationProcessor method createArtifactContext.
@Override
public ArtifactContext createArtifactContext(ArtifactContextConfiguration artifactContextConfiguration) throws ConfigurationException {
SpringXmlConfigurationBuilder springXmlConfigurationBuilder = new SpringXmlConfigurationBuilder(artifactContextConfiguration.getConfigResources(), artifactContextConfiguration.getArtifactDeclaration(), artifactContextConfiguration.getArtifactProperties(), artifactContextConfiguration.getArtifactType(), artifactContextConfiguration.isEnableLazyInitialization(), artifactContextConfiguration.isDisableXmlValidations());
artifactContextConfiguration.getParentContext().ifPresent(parentMuleContext -> springXmlConfigurationBuilder.setParentContext(parentMuleContext));
artifactContextConfiguration.getServiceConfigurators().stream().forEach(springXmlConfigurationBuilder::addServiceConfigurator);
springXmlConfigurationBuilder.configure(artifactContextConfiguration.getMuleContext());
return springXmlConfigurationBuilder.createArtifactContext();
}
use of org.mule.runtime.config.internal.SpringXmlConfigurationBuilder in project mule by mulesoft.
the class OptionalObjectsIgnoredTestCase method before.
@Before
public void before() throws Exception {
muleContext = (MuleContextWithRegistries) new DefaultMuleContextFactory().createMuleContext(testServicesConfigurationBuilder, new SpringXmlConfigurationBuilder(new String[0], emptyMap()));
muleContext.start();
muleContext.getRegistry().lookupByType(Calendar.class);
}
Aggregations