-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98fc367
commit 4cb230b
Showing
4 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 9 additions & 2 deletions
11
spring-resteasy/src/main/java/org/jboss/as/quickstarts/resteasyspring/RootResource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
package org.jboss.as.quickstarts.resteasyspring; | ||
|
||
import jakarta.ws.rs.core.Context; | ||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.Path; | ||
import jakarta.ws.rs.Produces; | ||
import jakarta.ws.rs.core.UriInfo; | ||
|
||
@Path("/") | ||
public class RootResource { | ||
|
||
@GET | ||
@Produces("text/html") | ||
public String getRootResponse() { | ||
String responsemsg = "Hello There! Welcome to WildFly! <br> Spring-resteasy quickstart has been deployed and running successfully. <br> You can find the available operations in the included README file."; | ||
public String getRootResponse(@Context UriInfo uriInfo) { | ||
String baseURI = uriInfo.getBaseUri().toString(); | ||
if (!baseURI.endsWith("/")) baseURI += '/'; | ||
baseURI = baseURI + "main/"; | ||
String responsemsg = "Hello There! Welcome to WildFly!" + | ||
"<br>Spring-resteasy quickstart has been deployed and running successfully. " + | ||
"<br>You can find the available operations <a href='"+baseURI+"'>here</a> or in the included README file."; | ||
return responsemsg; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters