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

@@ -138,7 +138,7 @@ public class RemoteDevToolsAutoConfigurationTests {
@Test
public void invokeRestartWithCustomServerContextPath() throws Exception {
loadContext("spring.devtools.remote.secret:supersecret",
"server.context-path:/test");
"server.servlet.context-path:/test");
DispatcherFilter filter = this.context.getBean(DispatcherFilter.class);
this.request.setRequestURI("/test" + DEFAULT_CONTEXT_PATH + "/restart");
this.request.addHeader(DEFAULT_SECRET_HEADER_NAME, "supersecret");
@@ -167,7 +167,7 @@ public class RemoteDevToolsAutoConfigurationTests {
@Test
public void invokeTunnelWithCustomServerContextPath() throws Exception {
loadContext("spring.devtools.remote.secret:supersecret",
"server.context-path:/test");
"server.servlet.context-path:/test");
DispatcherFilter filter = this.context.getBean(DispatcherFilter.class);
this.request.setRequestURI("/test" + DEFAULT_CONTEXT_PATH + "/debug");
this.request.addHeader(DEFAULT_SECRET_HEADER_NAME, "supersecret");
@@ -208,7 +208,7 @@ public class RemoteDevToolsAutoConfigurationTests {
@Test
public void devToolsHealthWithCustomServerContextPathReturns200() throws Exception {
loadContext("spring.devtools.remote.secret:supersecret",
"server.context-path:/test");
"server.servlet.context-path:/test");
DispatcherFilter filter = this.context.getBean(DispatcherFilter.class);
this.request.setRequestURI("/test" + DEFAULT_CONTEXT_PATH);
this.request.addHeader(DEFAULT_SECRET_HEADER_NAME, "supersecret");