Class JsonPathLinkDiscoverer

java.lang.Object
org.springframework.hateoas.client.JsonPathLinkDiscoverer
All Implemented Interfaces:
LinkDiscoverer, org.springframework.plugin.core.Plugin<org.springframework.http.MediaType>
Direct Known Subclasses:
AlpsLinkDiscoverer, CollectionJsonLinkDiscoverer, HalLinkDiscoverer

public class JsonPathLinkDiscoverer extends Object implements LinkDiscoverer
LinkDiscoverer that uses JsonPath to find links inside a representation.
Author:
Oliver Gierke, Greg Turnquist
  • Constructor Details

    • JsonPathLinkDiscoverer

      public JsonPathLinkDiscoverer(String pathTemplate, org.springframework.http.MediaType... mediaTypes)
      Creates a new JsonPathLinkDiscoverer using the given path template supporting the given MediaType. The template has to contain a single %s placeholder which will be replaced by the relation type.
      Parameters:
      pathTemplate - must not be null or empty and contain a single placeholder.
      mediaTypes - the MediaTypes to support.
  • Method Details