本文整理汇总了Java中org.apache.deltaspike.core.spi.config.ConfigSourceProvider类的典型用法代码示例。如果您正苦于以下问题:Java ConfigSourceProvider类的具体用法?Java ConfigSourceProvider怎么用?Java ConfigSourceProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ConfigSourceProvider类属于org.apache.deltaspike.core.spi.config包,在下文中一共展示了ConfigSourceProvider类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolveConfigSources
import org.apache.deltaspike.core.spi.config.ConfigSourceProvider; //导入依赖的package包/类
private static List<ConfigSource> resolveConfigSources()
{
List<ConfigSource> appConfigSources = ServiceUtils.loadServiceImplementations(ConfigSource.class);
List<ConfigSourceProvider> configSourceProviderServiceLoader =
ServiceUtils.loadServiceImplementations(ConfigSourceProvider.class);
for (ConfigSourceProvider configSourceProvider : configSourceProviderServiceLoader)
{
appConfigSources.addAll(configSourceProvider.getConfigSources());
}
List<? extends ConfigFilter> configFilters = ServiceUtils.loadServiceImplementations(ConfigFilter.class);
for (ConfigFilter configFilter : configFilters)
{
addConfigFilter(configFilter);
}
return appConfigSources;
}
示例2: jar
import org.apache.deltaspike.core.spi.config.ConfigSourceProvider; //导入依赖的package包/类
@Deployment
public static WebArchive jar() {
return ShrinkWrap.create(WebArchive.class)
.addClasses(Counter.class, MyConfigSource.class, MapConfigurationProvider.class)
.addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
.addAsResource(new ClassLoaderAsset("my-app-config.properties"), "my-app-config.properties")
.addAsLibraries(JarLocation.jarLocation(ConfigSourceProvider.class))
.addAsLibraries(JarLocation.jarLocation(DefaultConfigSourceProvider.class))
.addAsServiceProvider(ConfigSourceProvider.class, MyConfigSourceProvider.class);
}
示例3: war
import org.apache.deltaspike.core.spi.config.ConfigSourceProvider; //导入依赖的package包/类
protected static WebArchive war(final String projectStageName) {
return ShrinkWrap.create(WebArchive.class)
.addClasses(ProjectStageProducer.class, BaseTestForProjectStage.class, Manager.class, ManagerFactory.class)
.addAsResource(new StringAsset("org.apache.deltaspike.ProjectStage = " + projectStageName), ArchivePaths.create(ProjectStageProducer.CONFIG_PATH))
.addAsServiceProvider(ConfigSourceProvider.class, ProjectStageProducer.class)
.addAsLibraries(JarLocation.jarLocation(ProjectStage.class))
.addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
}
示例4: jar
import org.apache.deltaspike.core.spi.config.ConfigSourceProvider; //导入依赖的package包/类
@Deployment
public static WebArchive jar() {
return ShrinkWrap.create(WebArchive.class)
.addPackage(OSValidator.class.getPackage())
.addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
// DeltaSpike libs (api and impl)
.addAsLibraries(JarLocation.jarLocation(ConfigSourceProvider.class))
.addAsLibraries(JarLocation.jarLocation(DefaultConfigSourceProvider.class));
}
示例5: jar
import org.apache.deltaspike.core.spi.config.ConfigSourceProvider; //导入依赖的package包/类
@Deployment
public static WebArchive jar() {
return ShrinkWrap.create(WebArchive.class)
.addClasses(MessageHelper.class)
.addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
.addAsLibraries(JarLocation.jarLocation(ConfigSourceProvider.class))
.addAsLibraries(JarLocation.jarLocation(DefaultConfigSourceProvider.class));
}