如何通过 wildfly-maven-plugin 运行 为 WildFly 服务器提供服务?
how to run service with WildFly server by wildfly-maven-plugin?
我尝试使用 wildfly-maven-plugin 构建示例服务。
源码为:
https://github.com/wildfly/quickstart/tree/10.x/helloworld-html5
我想在 maven 中简单地使用 wildfly-maven-plugin pom.xml:
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.1.0.Alpha10</version>
</plugin>
像命令一样构建测试服务器:
mvn wildfly:run
到运行服务器。
我可以找到 README.md
但是url写的好像不对。
我测试了 link:
http://localhost:8080/jboss-helloworld-html5/hello/json/YOUR_NAME
和
http://localhost:8080/hello/json/YOUR_NAME
都给我404错误
有什么问题吗?
如何让mvn wildfly:run可以运行这个项目?
如Gimby said your context path should be wildfly-helloworld-html5
. It looks like the README is incorrect. The URL should be http://localhost:8080/wildfly-helloworld-html5/hello/xml/YOUR_NAME and http://localhost:8080/wildfly-helloworld-html5/hello/json/YOUR_NAME.
此外,当您启动时,您应该会在控制台上看到如下所示的日志消息。
08:22:18,281 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 58) WFLYUT0021: Registered web context: /wildfly-helloworld-html5
这将为您提供已注册的上下文。
我尝试使用 wildfly-maven-plugin 构建示例服务。 源码为:
https://github.com/wildfly/quickstart/tree/10.x/helloworld-html5
我想在 maven 中简单地使用 wildfly-maven-plugin pom.xml:
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.1.0.Alpha10</version>
</plugin>
像命令一样构建测试服务器:
mvn wildfly:run
到运行服务器。
我可以找到 README.md 但是url写的好像不对。
我测试了 link:
http://localhost:8080/jboss-helloworld-html5/hello/json/YOUR_NAME
和
http://localhost:8080/hello/json/YOUR_NAME
都给我404错误
有什么问题吗?
如何让mvn wildfly:run可以运行这个项目?
如Gimby said your context path should be wildfly-helloworld-html5
. It looks like the README is incorrect. The URL should be http://localhost:8080/wildfly-helloworld-html5/hello/xml/YOUR_NAME and http://localhost:8080/wildfly-helloworld-html5/hello/json/YOUR_NAME.
此外,当您启动时,您应该会在控制台上看到如下所示的日志消息。
08:22:18,281 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 58) WFLYUT0021: Registered web context: /wildfly-helloworld-html5
这将为您提供已注册的上下文。