diff --git a/resteasy-spring-mvc/README.md b/resteasy-spring-mvc/README.md index 7c9256b5..b81c56dc 100644 --- a/resteasy-spring-mvc/README.md +++ b/resteasy-spring-mvc/README.md @@ -31,3 +31,24 @@ $ curl http://localhost:8080/rest/foo ``` It will fetch the value of context parameter `foo` defined in `web.xml`. This shows the injection of `ServletContext` by `@Context` annotation. + + +## Deploying The Project To WildFly + +This example has embedded `wildfly-maven-plugin` embedded, so it can be deployed to a managed WildFly server by running the Maven command. Run the following command to build the example, download WildFly server, start the server and finish deployment automatically: + +```bash +$ mvn wildfly:run +``` + +After the embedded WildFly server is downloaded and run, access the example service with following `curl` command: + +```bash +$ curl http://localhost:8080/resteasy-spring-mvc/rest/foo +``` + +And it will print the output result: + +```bash +bar +``` diff --git a/resteasy-spring-mvc/pom.xml b/resteasy-spring-mvc/pom.xml index 79f5f53b..eea877b6 100755 --- a/resteasy-spring-mvc/pom.xml +++ b/resteasy-spring-mvc/pom.xml @@ -32,5 +32,16 @@ resteasy-spring-mvc + + + org.wildfly.plugins + wildfly-maven-plugin + ${version.wildfly-maven-plugin} + + wildfly-preview-dist + ${version.wildfly} + + + diff --git a/resteasy-spring-rest/README.md b/resteasy-spring-rest/README.md index 8ec86cbd..8562b87c 100644 --- a/resteasy-spring-rest/README.md +++ b/resteasy-spring-rest/README.md @@ -34,3 +34,23 @@ public class SpringRestAnnotationResource { } ``` +## Deploying The Project To WildFly + +This example has embedded `wildfly-maven-plugin` embedded, so it can be deployed to a managed WildFly server by running the Maven command. Run the following command to build the example, download WildFly server, start the server and finish deployment automatically: + +```bash +$ mvn wildfly:run +``` + +After the embedded WildFly server is downloaded and run, access the example service with following `curl` command: + +```bash +$ curl http://localhost:8080/resteasy-spring-example-rest/spring +``` + +And it will print the output result: + +```bash +Spring is coming! +``` + diff --git a/resteasy-spring-rest/pom.xml b/resteasy-spring-rest/pom.xml index 06dd824a..740b0acb 100755 --- a/resteasy-spring-rest/pom.xml +++ b/resteasy-spring-rest/pom.xml @@ -34,5 +34,16 @@ resteasy-spring-example-rest + + + org.wildfly.plugins + wildfly-maven-plugin + ${version.wildfly-maven-plugin} + + wildfly-preview-dist + ${version.wildfly} + + +