Created
May 19, 2016 12:28
-
-
Save fabriziocucci/8d39c47650fdf86008632d50e7e455ad to your computer and use it in GitHub Desktop.
REST resource that triggers a bug on Liberty with Java EE 7 Web Profile 8.5.5.9
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
package sample.helloworld; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.PathParam; | |
import javax.ws.rs.client.ClientBuilder; | |
@Path("/") | |
public class HelloWorldResource { | |
@Path("say/hello/to/{person}") | |
@GET | |
public String helloWorld(@PathParam("person") String person) { | |
return "Hello " + person; | |
} | |
@Path("triggerBug") | |
@GET | |
public String triggerBug() { | |
return ClientBuilder.newClient() | |
// return JerseyClientBuilder.createClient() | |
.target("http://localhost:9080/hello-world-0.0.1-SNAPSHOT/rest/say/hello/to/{person}") | |
.resolveTemplate("person", "Bob") | |
.request() | |
.get(String.class); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment