Skip to content

Instantly share code, notes, and snippets.

@reevik
Created February 14, 2022 10:07
Show Gist options
  • Save reevik/a8de43572739b29bc047a5e2d39ac032 to your computer and use it in GitHub Desktop.
Save reevik/a8de43572739b29bc047a5e2d39ac032 to your computer and use it in GitHub Desktop.
@Service
@Path("/")
public class MatrixResource {
@GET
@Path("/{status}/ping")
@Produces("text/plain")
public String ping(@PathParam("status") PathSegment status) {
MultivaluedMap<String, String> matrixParameters = status.getMatrixParameters();
String nameMatrixFromStatus = matrixParameters.getFirst("name");
return String.format("matrix variable name=%s", nameMatrixFromStatus);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment