Author: Weinan Li [email protected], Paul Gier [email protected]
Level: Beginner
Technologies: Resteasy, Spring
Summary: The spring-resteasy
quickstart demonstrates how to package and deploy a web application that includes resteasy-spring integration.
Target Product: JBoss EAP
Source: https://github.com/jboss-developer/jboss-eap-quickstarts/
The spring-resteasy
quickstart demonstrates how to package and deploy a web application, which includes resteasy-spring integration, in
Red Hat JBoss Enterprise Application Platform.
The application this project produces is designed to be run on Red Hat JBoss Enterprise Application Platform 7 or later.
All you need to build this project is Java 8.0 (Java SDK 1.8) or later and Maven 3.1.1 or later. See Configure Maven for JBoss EAP 7 to make sure you are configured correctly for testing the quickstarts.
-
Open a command line and navigate to the root of the JBoss EAP directory.
-
The following shows the command line to start the server with the full profile:
For Linux: EAP7_HOME/bin/standalone.sh For Windows: EAP7_HOME\bin\standalone.bat
-
Make sure you have started the JBoss EAP server as described above.
-
Open a command line and navigate to the root directory of this quickstart.
-
Type this command to build and deploy the archive:
mvn clean package wildfly:deploy
-
This deploys the
target/jboss-spring-resteasy.war
to the running instance of the server.
The application will be running at the following URL: http://localhost:8080/jboss-spring-resteasy/.
That will provide links to the following URLs that demonstrate various path and parameter configurations.
- jboss-spring-resteasy/hello?name=yourname
- jboss-spring-resteasy/basic
- jboss-spring-resteasy/queryParam?param=query
- jboss-spring-resteasy/matrixParam;param=matrix
- jboss-spring-resteasy/uriParam/789
And the same set as above but using the locating
path.
- jboss-spring-resteasy/locating/hello?name=yourname
- jboss-spring-resteasy/locating/basic
- jboss-spring-resteasy/locating/queryParam?param=query
- jboss-spring-resteasy/locating/matrixParam;param=matrix
- jboss-spring-resteasy/locating/uriParam/789
-
Make sure you have started the JBoss EAP server as described above and deployed the quickstart.
-
Open a command prompt and navigate to the root directory of this quickstart.
-
Type the following command to run the test goal with the following profile activated:
mvn install -Prest-test
-
You should see the following output:
------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.jboss.as.quickstarts.resteasyspring.test.ResteasySpringTest Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.211 sec Results : Tests run: 2, Failures: 0, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------
-
Make sure you have started the JBoss EAP server as described above.
-
Open a command line and navigate to the root directory of this quickstart.
-
When you are finished testing, type this command to undeploy the archive:
mvn wildfly:undeploy