Fix deprecations

Closes gh-16037
pull/16047/head
dreis2211 6 years ago committed by Stephane Nicoll
parent 00a18c32ab
commit 2ab4ce03db

@ -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;
}

@ -88,9 +88,11 @@ public class ReactiveWebServerApplicationContext
ServerManager serverManager = this.serverManager;
if (serverManager == null) {
String webServerFactoryBeanName = getWebServerFactoryBeanName();
ReactiveWebServerFactory webServerFactory = getWebServerFactory(
webServerFactoryBeanName);
boolean lazyInit = getBeanFactory()
.getBeanDefinition(webServerFactoryBeanName).isLazyInit();
this.serverManager = ServerManager.get(getWebServerFactory(), lazyInit);
this.serverManager = ServerManager.get(webServerFactory, lazyInit);
}
initPropertySources();
}

Loading…
Cancel
Save