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


Java WARArchive.staticContent方法代码示例

本文整理汇总了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);
}
 
开发者ID:weweave,项目名称:tubewarder,代码行数:18,代码来源:TubewarderSwarm.java

示例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);
}
 
开发者ID:amoAHCP,项目名称:openshift-workshop,代码行数:13,代码来源:MainApp.java

示例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;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:8,代码来源:StaticContentContextRootDeploymentTest.java

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

示例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.");
}
 
开发者ID:wildfly-swarm-archive,项目名称:ARCHIVE-wildfly-swarm,代码行数:12,代码来源:JSFTest.java

示例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;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:7,代码来源:StaticContentPathDeploymentTest.java

示例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;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:7,代码来源:StaticContentDeploymentTest.java

示例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;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:7,代码来源:StaticContentWarTest.java

示例12: createDeployment

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment
public static Archive createDeployment() {
    WARArchive deployment = ShrinkWrap.create(WARArchive.class);
    deployment.staticContent();
    return deployment;
}
 
开发者ID:wildfly-swarm-archive,项目名称:ARCHIVE-wildfly-swarm,代码行数:7,代码来源:SimpleMailTest.java


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