Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ResourceContext.matchResource(URI)允许我将 URI 转换为资源,但我如何从资源转到其 URI?
回答我自己的问题:
@Context UriInfo uriInfo; public URI getUri() { return uriInfo.getBaseUriBuilder().path(MyResource.class).build(); }