本文整理汇总了Java中org.wildfly.swarm.undertow.WARArchive.addClass方法的典型用法代码示例。如果您正苦于以下问题:Java WARArchive.addClass方法的具体用法?Java WARArchive.addClass怎么用?Java WARArchive.addClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.wildfly.swarm.undertow.WARArchive
的用法示例。
在下文中一共展示了WARArchive.addClass方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getImplicitDeployments
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Override
public List<Archive> getImplicitDeployments(TopologyWebAppFraction fraction) throws Exception {
String context = System.getProperty(TopologyProperties.CONTEXT_PATH);
if (context == null) context = DEFAULT_CONTEXT;
List<Archive> list = new ArrayList<>();
if (fraction.exposeTopologyEndpoint()) {
WARArchive war = ShrinkWrap.create(WARArchive.class, "topology-webapp.war");
war.addAsWebInfResource(new StringAsset(getWebXml(fraction)), "web.xml");
war.addClass(TopologySSEServlet.class);
war.addModule("swarm.application");
war.addModule("org.wildfly.swarm.topology");
war.addAsWebResource(new ClassLoaderAsset("topology.js", this.getClass().getClassLoader()), "topology.js");
war.setContextRoot(context);
war.as(TopologyArchive.class);
list.add(war);
}
return list;
}
开发者ID:wildfly-swarm-archive,项目名称:wildfly-swarm-topology,代码行数:20,代码来源:TopologyWebAppConfiguration.java
示例2: createDeployment
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment
public static Archive createDeployment() throws Exception {
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
// on real world deployments, these parts would come from a dependency of the target application
deployment.addClass(MockTracerResolver.class);
deployment.addPackage(MockTracer.class.getPackage());
deployment.addAsServiceProvider(TracerResolver.class, MockTracerResolver.class);
// this is a simple servlet, that we can hit with our tests
deployment.addClass(SimpleServlet.class);
deployment.addClass(HealthServlet.class);
deployment.addAsResource("project-skip-pattern.yml");
return deployment;
}
示例3: deployment
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Produces
@Dependent()
Archive deployment() {
String context = TopologyWebAppFraction.DEFAULT_CONTEXT;
if (this.contextPath != null) {
context = this.contextPath;
}
if (fraction.exposeTopologyEndpoint()) {
WARArchive war = ShrinkWrap.create(WARArchive.class, "topology-webapp.war");
war.addAsWebInfResource(new StringAsset(getWebXml(fraction)), "web.xml");
war.addClass(TopologySSEServlet.class);
war.addModule("swarm.application");
war.addModule("org.wildfly.swarm.topology");
war.addAsWebResource(new ClassLoaderAsset("topology.js", this.getClass().getClassLoader()), "topology.js");
war.setContextRoot(context);
war.as(TopologyArchive.class);
return war;
}
return null;
}
示例4: getImplicitDeployments
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Override
public List<Archive> getImplicitDeployments(TopologyWebAppFraction fraction) throws Exception {
String context = System.getProperty(TopologyProperties.CONTEXT_PATH);
if (context == null) context = DEFAULT_CONTEXT;
List<Archive> list = new ArrayList<>();
WARArchive war = ShrinkWrap.create(WARArchive.class, "topology-webapp.war");
war.addAsWebInfResource(new StringAsset(getWebXml(fraction)), "web.xml");
war.addClass(TopologySSEServlet.class);
war.addModule("swarm.application");
war.addModule("org.wildfly.swarm.topology");
war.addAsWebResource(new ClassLoaderAsset("topology.js", this.getClass().getClassLoader()), "topology.js");
war.setContextRoot(context);
war.as(TopologyArchive.class);
list.add(war);
return list;
}
开发者ID:wildfly-swarm-archive,项目名称:ARCHIVE-wildfly-swarm,代码行数:18,代码来源:TopologyWebAppConfiguration.java
示例5: createDeployment
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment(testable = false)
public static Archive<?> createDeployment() throws Exception {
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.addPackage("pro.taskana");
deployment.addClass(TaskanaProducers.class);
deployment.addAllDependencies();
deployment.addDependency("org.mybatis:mybatis:3.4.2");
deployment.addDependency("org.mybatis:mybatis-cdi:1.0.0");
deployment.addDependency("pro.taskana:taskana-core:0.0.5-SNAPSHOT");
deployment.addAsResource("META-INF/beans.xml");
deployment.addAsResource("taskana.properties");
deployment.addAsResource("project-defaults.yml");
return deployment;
}
示例6: createDeployment
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment
public static Archive createDeployment() throws Exception {
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
// on real world deployments, these parts would come from a dependency of the target application
deployment.addClass(MockTracerResolver.class);
deployment.addPackage(MockTracer.class.getPackage());
deployment.addAsServiceProvider(TracerResolver.class, MockTracerResolver.class);
// this is a simple servlet, that we can hit with our tests
deployment.addClass(SimpleServlet.class);
return deployment;
}
示例7: createDeployment
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment
public static Archive createDeployment() throws Exception {
WARArchive deployment = ShrinkWrap.create(WARArchive.class, "services.war");
deployment.addAsLibraries(Maven.resolver().resolve("saxon:saxon:8.7").withTransitivity().asFile());
deployment.addClass(ServicesServlet.class);
deployment.addClass(TransformerServlet.class);
return deployment;
}
示例8: createDeployment
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment
public static Archive createDeployment() throws Exception {
WARArchive deployment = ShrinkWrap.create(WARArchive.class, "services.war");
deployment.addClass(ServicesServlet.class);
deployment.addClass(TransformerServlet.class);
return deployment;
}
示例9: createDeployment
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment(testable = false)
public static Archive createDeployment() {
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.addClass(TestServlet.class);
return deployment;
}
示例10: testDetectJAXRSness_isNot
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Test
public void testDetectJAXRSness_isNot() {
WARArchive archive = ShrinkWrap.create( WARArchive.class );
archive.addClass( MyRandomClass.class );
assertThat( JAXRSArchive.isJAXRS( archive )).isFalse();
}
示例11: testDetectJAXRSness_classAnnotation
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Test
public void testDetectJAXRSness_classAnnotation() {
WARArchive archive = ShrinkWrap.create( WARArchive.class );
archive.addClass( MyResource.class );
assertThat( JAXRSArchive.isJAXRS( archive )).isTrue();
}
示例12: testDetectJAXRSness_methodAnnotation
import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Test
public void testDetectJAXRSness_methodAnnotation() {
WARArchive archive = ShrinkWrap.create( WARArchive.class );
archive.addClass( MyOtherResource.class );
assertThat( JAXRSArchive.isJAXRS( archive )).isTrue();
}