From e84e9a3f5f821fcd0630a3c69394aca298f5ceb3 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Fri, 22 Aug 2014 17:38:51 +0200 Subject: [PATCH] #224 - Fixed type in readme. Removed trailing whitespace as well. --- readme.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index cdd948c7..f2f45356 100644 --- a/readme.md +++ b/readme.md @@ -62,7 +62,7 @@ assertThat(resource.getLink(Link.SELF), is(selfLink)); ``` ## Link builder -Now we've got the domain vocabulary in place, but the main challenge remains: how to create the actual URIs to be wrapped into `Link`s in a less fragile way. Right now we'd have to duplicate URI strings all over the place which is brittle and unmaintainable. +Now we've got the domain vocabulary in place, but the main challenge remains: how to create the actual URIs to be wrapped into `Link`s in a less fragile way. Right now we'd have to duplicate URI strings all over the place which is brittle and unmaintainable. Assume you have your Spring MVC controllers implemented as follows: @@ -229,7 +229,7 @@ Iterable people = Collections.singletonList(person); PersonResourceAssembler assembler = new PersonResourceAssembler(); PersonResource resource = assembler.toResource(person); -List resources = assembler.toResource(people); +List resources = assembler.toResources(people); ``` ## @EnableHypermediaSupport @@ -280,7 +280,7 @@ public class Config { @Bean public CurieProvider curieProvider() { - return new DefaultCurieProvider("ex", + return new DefaultCurieProvider("ex", new UriTemplate("http://www.example.com{#rel}")); } } @@ -310,7 +310,6 @@ Since the purpose of the `CurieProvider` API is to allow for automatic curie cre As of version 0.11 Spring HATEOAS provides an API for client side service traversal inspired by the [Traverson](https://blog.codecentric.de/en/2013/11/traverson/) JavaScript library. - ```java Map parameters = new HashMap<>(); parameters.put("user", 27);