|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2012-2017 the original author or authors.
|
|
|
|
|
* Copyright 2012-2019 the original author or authors.
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
@ -20,7 +20,7 @@ import java.util.HashMap;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import org.springframework.hateoas.MediaTypes;
|
|
|
|
|
import org.springframework.hateoas.mvc.ControllerLinkBuilder;
|
|
|
|
|
import org.springframework.hateoas.mvc.WebMvcLinkBuilder;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
@ -33,7 +33,7 @@ public class RestDocsTestController {
|
|
|
|
|
public Map<String, Object> index() {
|
|
|
|
|
Map<String, Object> response = new HashMap<>();
|
|
|
|
|
Map<String, String> links = new HashMap<>();
|
|
|
|
|
links.put("self", ControllerLinkBuilder.linkTo(getClass()).toUri().toString());
|
|
|
|
|
links.put("self", WebMvcLinkBuilder.linkTo(getClass()).toUri().toString());
|
|
|
|
|
response.put("_links", links);
|
|
|
|
|
return response;
|
|
|
|
|
}
|
|
|
|
|