我尝试使用wildfly-maven-plugin来构建示例服务 . 源代码是:
https://github.com/wildfly/quickstart/tree/10.x/helloworld-html5
我想在maven pom.xml中简单地使用wildfly-maven-plugin:
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.1.0.Alpha10</version>
</plugin>
要像命令一样构建测试服务器:
mvn wildfly:run
运行服务器 .
我可以找到README.md,但写的url似乎有误 .
我测试链接:
http://localhost:8080/jboss-helloworld-html5/hello/json/YOUR_NAME
和
http://localhost:8080/hello/json/YOUR_NAME
所有给我404错误 .
有什么不对吗?
如何制作mvn wildfly:运行可以运行这个项目吗?
1 回答
正如Gimby所说,你的上下文路径应该是
wildfly-helloworld-html5
. 看起来README不正确 . 该URL应为http://localhost:8080/wildfly-helloworld-html5/hello/xml/YOUR_NAME和http://localhost:8080/wildfly-helloworld-html5/hello/json/YOUR_NAME .此外,当您启动时,您应该在控制台上看到如下所示的日志消息 .
这将为您提供已注册的上下文 .