Introduce "server.servlet" configuration prefix

This commit refactors the `ServerProperties` property keys and
introduces a separate "server.servlet" namespace to isolate
servlet-specific properties from the rest.

Closes gh-8066
This commit is contained in:
Brian Clozel
2017-01-26 21:43:04 +01:00
parent a31a792192
commit 12d883f6b9
37 changed files with 239 additions and 195 deletions

View File

@@ -78,7 +78,7 @@ public class LocalHostUriTemplateHandlerTests {
@Test
public void getRootUriShouldUseContextPath() throws Exception {
MockEnvironment environment = new MockEnvironment();
environment.setProperty("server.contextPath", "/foo");
environment.setProperty("server.servlet.context-path", "/foo");
LocalHostUriTemplateHandler handler = new LocalHostUriTemplateHandler(
environment);
assertThat(handler.getRootUri()).isEqualTo("http://localhost:8080/foo");