Commit 2ab4ce03 authored by dreis2211's avatar dreis2211 Committed by Stephane Nicoll

Fix deprecations

Closes gh-16037
parent 00a18c32
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -20,7 +20,7 @@ import java.util.HashMap; ...@@ -20,7 +20,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.springframework.hateoas.MediaTypes; 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.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -33,7 +33,7 @@ public class RestDocsTestController { ...@@ -33,7 +33,7 @@ public class RestDocsTestController {
public Map<String, Object> index() { public Map<String, Object> index() {
Map<String, Object> response = new HashMap<>(); Map<String, Object> response = new HashMap<>();
Map<String, String> links = 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); response.put("_links", links);
return response; return response;
} }
......
...@@ -88,9 +88,11 @@ public class ReactiveWebServerApplicationContext ...@@ -88,9 +88,11 @@ public class ReactiveWebServerApplicationContext
ServerManager serverManager = this.serverManager; ServerManager serverManager = this.serverManager;
if (serverManager == null) { if (serverManager == null) {
String webServerFactoryBeanName = getWebServerFactoryBeanName(); String webServerFactoryBeanName = getWebServerFactoryBeanName();
ReactiveWebServerFactory webServerFactory = getWebServerFactory(
webServerFactoryBeanName);
boolean lazyInit = getBeanFactory() boolean lazyInit = getBeanFactory()
.getBeanDefinition(webServerFactoryBeanName).isLazyInit(); .getBeanDefinition(webServerFactoryBeanName).isLazyInit();
this.serverManager = ServerManager.get(getWebServerFactory(), lazyInit); this.serverManager = ServerManager.get(webServerFactory, lazyInit);
} }
initPropertySources(); initPropertySources();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment