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:
@@ -95,8 +95,8 @@ public class RemoteDevToolsAutoConfiguration {
|
||||
@Bean
|
||||
public HandlerMapper remoteDevToolsHealthCheckHandlerMapper() {
|
||||
Handler handler = new HttpStatusHandler();
|
||||
return new UrlHandlerMapper((this.serverProperties.getContextPath() == null ? ""
|
||||
: this.serverProperties.getContextPath())
|
||||
return new UrlHandlerMapper((this.serverProperties.getServlet().getContextPath() == null ? ""
|
||||
: this.serverProperties.getServlet().getContextPath())
|
||||
+ this.properties.getRemote().getContextPath(), handler);
|
||||
}
|
||||
|
||||
@@ -136,8 +136,8 @@ public class RemoteDevToolsAutoConfiguration {
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(name = "remoteRestartHandlerMapper")
|
||||
public UrlHandlerMapper remoteRestartHandlerMapper(HttpRestartServer server) {
|
||||
String url = (this.serverProperties.getContextPath() == null ? ""
|
||||
: this.serverProperties.getContextPath())
|
||||
String url = (this.serverProperties.getServlet().getContextPath() == null ? ""
|
||||
: this.serverProperties.getServlet().getContextPath())
|
||||
+ this.properties.getRemote().getContextPath() + "/restart";
|
||||
logger.warn("Listening for remote restart updates on " + url);
|
||||
Handler handler = new HttpRestartServerHandler(server);
|
||||
@@ -162,8 +162,8 @@ public class RemoteDevToolsAutoConfiguration {
|
||||
@ConditionalOnMissingBean(name = "remoteDebugHandlerMapper")
|
||||
public UrlHandlerMapper remoteDebugHandlerMapper(
|
||||
@Qualifier("remoteDebugHttpTunnelServer") HttpTunnelServer server) {
|
||||
String url = (this.serverProperties.getContextPath() == null ? ""
|
||||
: this.serverProperties.getContextPath())
|
||||
String url = (this.serverProperties.getServlet().getContextPath() == null ? ""
|
||||
: this.serverProperties.getServlet().getContextPath())
|
||||
+ this.properties.getRemote().getContextPath() + "/debug";
|
||||
logger.warn("Listening for remote debug traffic on " + url);
|
||||
Handler handler = new HttpTunnelServerHandler(server);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class DevToolsPropertyDefaultsPostProcessor implements EnvironmentPostPro
|
||||
properties.put("spring.resources.chain.cache", "false");
|
||||
properties.put("spring.template.provider.cache", "false");
|
||||
properties.put("spring.mvc.log-resolved-exception", "true");
|
||||
properties.put("server.jsp-servlet.init-parameters.development", "true");
|
||||
properties.put("server.servlet.jsp.init-parameters.development", "true");
|
||||
properties.put("spring.reactor.stacktrace-mode.enabled", "true");
|
||||
PROPERTIES = Collections.unmodifiableMap(properties);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user