本文整理汇总了Java中org.jboss.shrinkwrap.api.container.ResourceContainer类的典型用法代码示例。如果您正苦于以下问题:Java ResourceContainer类的具体用法?Java ResourceContainer怎么用?Java ResourceContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResourceContainer类属于org.jboss.shrinkwrap.api.container包,在下文中一共展示了ResourceContainer类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: process
import org.jboss.shrinkwrap.api.container.ResourceContainer; //导入依赖的package包/类
@Override
public void process(Archive<?> applicationArchive, TestClass testClass) {
if (!(applicationArchive instanceof ResourceContainer)) {
LOGGER.warning("Unable to add Hystrix config.properties - not a resource container: " + applicationArchive);
return;
}
LOGGER.info("Adding customized Hystrix config.properties to " + applicationArchive);
ResourceContainer<?> resourceContainer = (ResourceContainer<?>) applicationArchive;
resourceContainer.addAsResource(buildProperties(), "config.properties");
}
示例2: process
import org.jboss.shrinkwrap.api.container.ResourceContainer; //导入依赖的package包/类
@Override
public void process(Archive<?> applicationArchive, TestClass testClass) {
String prefix = getPrefix();
if (prefix != null) {
if (applicationArchive instanceof ResourceContainer) {
ResourceContainer<?> container = (ResourceContainer<?>) applicationArchive;
container.addAsResource(new StringAsset(
toString(filterSystemProperties(prefix))),
SystemProperties.FILE_NAME);
}
}
}
示例3: storeProperties
import org.jboss.shrinkwrap.api.container.ResourceContainer; //导入依赖的package包/类
public static void storeProperties(ResourceContainer container, Properties properties, String fileName) throws IOException {
StringWriter writer = new StringWriter();
properties.store(writer, "CE-Arquillian");
container.addAsResource(new StringAsset(writer.toString()), fileName);
}
示例4: store
import org.jboss.shrinkwrap.api.container.ResourceContainer; //导入依赖的package包/类
public void store(ResourceContainer container) throws IOException {
storeProperties(container, properties, fileName);
}