Allow the display-name of the application to be customized when deployed
in an embedded container via the `server.display-name` property.
Closes gh-2600
@ -80,6 +80,11 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
@@ -80,6 +80,11 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
*/
privateStringcontextPath;
/**
*Displaynameoftheapplication.
*/
privateStringdisplayName="application";
@NestedConfigurationProperty
privateSslssl;
@ -122,6 +127,14 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
@@ -122,6 +127,14 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
this.contextPath=contextPath;
}
publicStringgetDisplayName(){
returnthis.displayName;
}
publicvoidsetDisplayName(StringdisplayName){
this.displayName=displayName;
}
publicStringgetServletPath(){
returnthis.servletPath;
}
@ -213,6 +226,9 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
@@ -213,6 +226,9 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
@ -61,6 +61,7 @@ content into your application; rather pick only the properties that you need.
@@ -61,6 +61,7 @@ content into your application; rather pick only the properties that you need.
server.jsp-servlet.init-parameters.*= # Init parameters used to configure the JSP servlet
server.jsp-servlet.registered=true # Whether or not the JSP servlet is registered
server.servlet-path= # the servlet path, defaults to '/'
server.display-name= # the display name of the application
server.ssl.enabled=true # if SSL support is enabled
@ -44,6 +45,8 @@ public abstract class AbstractConfigurableEmbeddedServletContainer implements
@@ -44,6 +45,8 @@ public abstract class AbstractConfigurableEmbeddedServletContainer implements
privateStringcontextPath="";
privateStringdisplayName;
privatebooleanregisterDefaultServlet=true;
privateintport=8080;
@ -120,6 +123,15 @@ public abstract class AbstractConfigurableEmbeddedServletContainer implements
@@ -120,6 +123,15 @@ public abstract class AbstractConfigurableEmbeddedServletContainer implements
@ -231,6 +231,7 @@ public class JettyEmbeddedServletContainerFactory extends
@@ -231,6 +231,7 @@ public class JettyEmbeddedServletContainerFactory extends
@ -161,6 +161,7 @@ public class TomcatEmbeddedServletContainerFactory extends
@@ -161,6 +161,7 @@ public class TomcatEmbeddedServletContainerFactory extends
@ -325,6 +325,7 @@ public class UndertowEmbeddedServletContainerFactory extends
@@ -325,6 +325,7 @@ public class UndertowEmbeddedServletContainerFactory extends