当前位置: 首页>>代码示例>>Java>>正文


Java ConfigSourceProvider类代码示例

本文整理汇总了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;
}
 
开发者ID:apache,项目名称:deltaspike,代码行数:21,代码来源:ConfigResolver.java

示例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);
}
 
开发者ID:apache,项目名称:tomee,代码行数:11,代码来源:ConfigTest.java

示例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"));
}
 
开发者ID:apache,项目名称:tomee,代码行数:9,代码来源:BaseTestForProjectStage.java

示例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));
}
 
开发者ID:apache,项目名称:tomee,代码行数:10,代码来源:ExceptionHandlingDemoTest.java

示例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));
}
 
开发者ID:apache,项目名称:tomee,代码行数:9,代码来源:MessageHelperTest.java


注:本文中的org.apache.deltaspike.core.spi.config.ConfigSourceProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。