DATAREST-549 - Added @JsonIgnore to RepositorySearchesResource.getDomainType().

This commit is contained in:
Oliver Gierke
2015-05-18 19:45:46 +02:00
parent 17305f4067
commit a7b672a64a
2 changed files with 6 additions and 1 deletions

View File

@@ -19,6 +19,8 @@ import org.springframework.hateoas.ResourceProcessor;
import org.springframework.hateoas.ResourceSupport;
import org.springframework.util.Assert;
import com.fasterxml.jackson.annotation.JsonIgnore;
/**
* A custom {@link ResourceSupport} type to be able to write custom {@link ResourceProcessor}s to add additional links
* to ones automatically exposed for Spring Data repository query methods.
@@ -45,6 +47,7 @@ public class RepositorySearchesResource extends ResourceSupport {
*
* @return
*/
@JsonIgnore
public Class<?> getDomainType() {
return domainType;
}

View File

@@ -119,7 +119,9 @@ public abstract class CommonWebTests extends AbstractWebIntegrationTests {
Link searchLink = client.getDiscoverer(response).findLinkWithRel("search", rootResourceRepresentation);
if (searchLink != null) {
client.follow(searchLink).andExpect(client.hasLinkWithRel("self"));
client.follow(searchLink).//
andExpect(client.hasLinkWithRel("self")).//
andExpect(jsonPath("$.domainType", is(nullValue()))); // DATAREST-549
}
}
}