Merge branch '2.6.x' into 2.7.x
Closes gh-30167
This commit is contained in:
@@ -16,9 +16,11 @@
|
||||
|
||||
package org.springframework.boot.devtools.env;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
@@ -60,24 +62,19 @@ public class DevToolsPropertyDefaultsPostProcessor implements EnvironmentPostPro
|
||||
private static final Map<String, Object> PROPERTIES;
|
||||
|
||||
static {
|
||||
Map<String, Object> properties = new HashMap<>();
|
||||
properties.put("spring.thymeleaf.cache", "false");
|
||||
properties.put("spring.freemarker.cache", "false");
|
||||
properties.put("spring.graphql.graphiql.enabled", "true");
|
||||
properties.put("spring.groovy.template.cache", "false");
|
||||
properties.put("spring.mustache.cache", "false");
|
||||
properties.put("server.servlet.session.persistent", "true");
|
||||
properties.put("spring.h2.console.enabled", "true");
|
||||
properties.put("spring.web.resources.cache.period", "0");
|
||||
properties.put("spring.web.resources.chain.cache", "false");
|
||||
properties.put("spring.template.provider.cache", "false");
|
||||
properties.put("spring.mvc.log-resolved-exception", "true");
|
||||
properties.put("server.error.include-binding-errors", "ALWAYS");
|
||||
properties.put("server.error.include-message", "ALWAYS");
|
||||
properties.put("server.error.include-stacktrace", "ALWAYS");
|
||||
properties.put("server.servlet.jsp.init-parameters.development", "true");
|
||||
properties.put("spring.reactor.debug", "true");
|
||||
PROPERTIES = Collections.unmodifiableMap(properties);
|
||||
Properties properties = new Properties();
|
||||
try (InputStream stream = DevToolsPropertyDefaultsPostProcessor.class
|
||||
.getResourceAsStream("devtools-property-defaults.properties")) {
|
||||
properties.load(stream);
|
||||
}
|
||||
catch (IOException ex) {
|
||||
throw new RuntimeException("Failed to load devtools-property-defaults.properties", ex);
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
for (String name : properties.stringPropertyNames()) {
|
||||
map.put(name, properties.getProperty(name));
|
||||
}
|
||||
PROPERTIES = map;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
server.error.include-binding-errors=always
|
||||
server.error.include-message=always
|
||||
server.error.include-stacktrace=always
|
||||
server.servlet.jsp.init-parameters.development=true
|
||||
server.servlet.session.persistent=true
|
||||
spring.freemarker.cache=false
|
||||
spring.graphql.graphiql.enabled=true
|
||||
spring.groovy.template.cache=false
|
||||
spring.h2.console.enabled=true
|
||||
spring.mustache.cache=false
|
||||
spring.mvc.log-resolved-exception=true
|
||||
spring.reactor.debug=true
|
||||
spring.template.provider.cache=false
|
||||
spring.thymeleaf.cache=false
|
||||
spring.web.resources.cache.period=0
|
||||
spring.web.resources.chain.cache=false
|
||||
Reference in New Issue
Block a user