This commit is contained in:
Phillip Webb
2014-03-20 09:07:56 -07:00
parent 63de33ef3e
commit 3193913899
6 changed files with 29 additions and 28 deletions

View File

@@ -24,8 +24,8 @@ class endpoint {
// Don't require passed argument to end with 'Endpoint'
if (!name.endsWith("Endpoint")) {
name = name + "Endpoint"
}
name = name + "Endpoint"
}
context.attributes['spring.beanfactory'].getBeansOfType(Endpoint.class).each { n, endpoint ->
if (n.equals(name) && endpoint.isEnabled()) {

View File

@@ -1,20 +1,20 @@
welcome = { ->
if (!crash.context.attributes['spring.environment'].getProperty("spring.main.show_banner", Boolean.class, Boolean.TRUE)) {
return ""
}
if (!crash.context.attributes['spring.environment'].getProperty("spring.main.show_banner", Boolean.class, Boolean.TRUE)) {
return ""
}
// Resolve hostname
def hostName;
try {
hostName = java.net.InetAddress.getLocalHost().getHostName();
} catch (java.net.UnknownHostException ignore) {
hostName = "localhost";
}
// Resolve hostname
def hostName;
try {
hostName = java.net.InetAddress.getLocalHost().getHostName();
} catch (java.net.UnknownHostException ignore) {
hostName = "localhost";
}
// Get Spring Boot version from context
def version = crash.context.attributes.get("spring.boot.version")
Get Spring Boot version from context
def version = crash.context.attributes.get("spring.boot.version")
return """\
return """\
. ____ _ __ _ _
/\\\\ / ___'_ __ _ _(_)_ __ __ _ \\ \\ \\ \\
( ( )\\___ | '_ | '_| | '_ \\/ _` | \\ \\ \\ \\
@@ -26,5 +26,5 @@ welcome = { ->
}
prompt = { ->
return "> ";
return "> ";
}