From 23e7028abb8f7bde9cdca05acbfdd589ff595f6a Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Thu, 20 Nov 2014 12:00:19 +0000 Subject: [PATCH 1/2] Ensure java.io.tmpdir is available before using it Some environments do not have a tmpdir so it can be null. --- .../boot/logging/LoggingApplicationListener.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java index 8b465da0a8..d3eee2c1a9 100644 --- a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java @@ -168,11 +168,13 @@ public class LoggingApplicationListener implements SmartApplicationListener { // Logback won't read backslashes so add a clean path for it to use if (!StringUtils.hasLength(System.getProperty("LOG_TEMP"))) { String path = System.getProperty("java.io.tmpdir"); - path = StringUtils.cleanPath(path); - if (path.endsWith("/")) { - path = path.substring(0, path.length() - 1); - } - System.setProperty("LOG_TEMP", path); + if (path!=null) { + path = StringUtils.cleanPath(path); + if (path.endsWith("/")) { + path = path.substring(0, path.length() - 1); + } + System.setProperty("LOG_TEMP", path); + } } } From 404153a7580f6ea78a57c8b558a0532dab711cae Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Thu, 20 Nov 2014 11:49:26 +0100 Subject: [PATCH 2/2] Minor fixes in howto documentation re:SSL config Fixes a couple of typos in the documentation: * `x-forwarded-protocol` is not the standard name for this header * `require_https` is not an existing property, but rather `require_ssl` --- spring-boot-docs/src/main/asciidoc/howto.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index a967d4931f..895b4a5475 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -474,7 +474,7 @@ most proxies, and if you only set one the other will be set automatically): [indent=0] ---- server.tomcat.remote_ip_header=x-forwarded-for - server.tomcat.protocol_header=x-forwarded-protocol + server.tomcat.protocol_header=x-forwarded-proto ---- If your proxy uses different headers you can customize the valve's configuration by adding @@ -1450,7 +1450,7 @@ by adding some entries to `application.properties`, e.g. Spring Security can also be configured to require a secure channel for all (or some requests). To switch that on in a Spring Boot application you just need to set -`security.require_https` to `true` in `application.properties`. +`security.require_ssl` to `true` in `application.properties`.