本文整理汇总了Java中org.wildfly.swarm.undertow.WARArchive.staticContent方法的典型用法代码示例。如果您正苦于以下问题:Java WARArchive.staticContent方法的具体用法?Java WARArchive.staticContent怎么用?Java WARArchive.staticContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.wildfly.swarm.undertow.WARArchive
的用法示例。
在下文中一共展示了WARArchive.staticContent方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deployApp
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
private void deployApp() throws Exception {
WARArchive appDeployment = ShrinkWrap.create(WARArchive.class, "tubewarder.war");
appDeployment.addPackages(true, "net.weweave.tubewarder");
appDeployment.addAsWebInfResource(new ClassLoaderAsset("META-INF/persistence-"+getConfig().getDb()+".xml", TubewarderSwarm.class.getClassLoader()), "classes/META-INF/persistence.xml");
if ("postgresql".equals(getConfig().getDb())) {
appDeployment.addAsWebInfResource(new ClassLoaderAsset("META-INF/" + getConfig().getDb() + "-mapping.xml", TubewarderSwarm.class.getClassLoader()), "classes/META-INF/postgresql-mapping.xml");
}
File[] libs = getAdditionalJars();
for (File lib : libs) {
appDeployment.addAsLibrary(lib, lib.getName());
}
appDeployment.addAllDependencies();
appDeployment.staticContent();
deploy(appDeployment);
}
示例2: main
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
Swarm swarm = new Swarm();
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.
addAllDependencies().
addClass(JaxRsActivator.class).
addAsServiceProvider(Extension.class, K8SExtension.class).
addPackages(true,"ch.trivadis.workshop");
deployment.staticContent();
swarm.start();
swarm.deploy(deployment);
}
示例3: getSecond
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment(testable = false)
public static Archive getSecond() throws Exception {
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.setContextRoot("/static");
deployment.staticContent();
return deployment;
}
示例4: createDeployment
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment
public static Archive createDeployment() throws Exception {
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.staticContent("foo");
// Make sure we're testing from contents inside the jar only
deployment.delete("WEB-INF/undertow-external-mounts.conf");
return deployment;
}
示例5: testSimple
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
public void testSimple() throws Exception {
container = newContainer();
container.start();
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.staticContent();
container.deploy(deployment);
String result = fetch(DEFAULT_URL);
assertThat(result).contains("This is static.");
}
示例6: testStaticContent
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Test
public void testStaticContent() throws Exception {
Container container = newContainer();
container.start();
try {
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.staticContent();
container.deploy(deployment);
assertBasicStaticContentWorks("");
assertFileChangesReflected("");
} finally {
container.stop();
}
}
开发者ID:wildfly-swarm-archive,项目名称:ARCHIVE-wildfly-swarm,代码行数:15,代码来源:StaticContentDeploymentTest.java
示例7: testStaticContentWithContext
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Test
public void testStaticContentWithContext() throws Exception {
Container container = newContainer();
container.start();
try {
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.setContextRoot("/static");
deployment.staticContent();
container.deploy(deployment);
assertBasicStaticContentWorks("static");
assertFileChangesReflected("static");
} finally {
container.stop();
}
}
开发者ID:wildfly-swarm-archive,项目名称:ARCHIVE-wildfly-swarm,代码行数:16,代码来源:StaticContentDeploymentTest.java
示例8: testStaticContentWithBase
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Test
public void testStaticContentWithBase() throws Exception {
Container container = newContainer();
container.start();
try {
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.staticContent("foo");
container.deploy(deployment);
assertContains("", "This is foo/index.html.");
assertContains("index.html", "This is foo/index.html.");
} finally {
container.stop();
}
}
开发者ID:wildfly-swarm-archive,项目名称:ARCHIVE-wildfly-swarm,代码行数:15,代码来源:StaticContentDeploymentTest.java
示例9: getThird
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment(testable = false)
public static Archive getThird() throws Exception {
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.staticContent("foo");
return deployment;
}
示例10: getFirst
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment(testable = false)
public static Archive getFirst() throws Exception {
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.staticContent();
return deployment;
}
示例11: createDeployment
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment
public static Archive createDeployment() throws Exception {
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.staticContent();
return deployment;
}
示例12: createDeployment
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment
public static Archive createDeployment() {
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.staticContent();
return deployment;
}