Add config hint to template error messages
This commit is contained in:
@@ -67,9 +67,12 @@ public class FreeMarkerAutoConfiguration {
|
||||
if (this.properties.isCheckTemplateLocation()) {
|
||||
Resource resource = this.resourceLoader.getResource(this.properties
|
||||
.getTemplateLoaderPath());
|
||||
Assert.state(resource.exists(), "Cannot find template location: " + resource
|
||||
+ " (please add some templates "
|
||||
+ "or check your FreeMarker configuration)");
|
||||
Assert.state(
|
||||
resource.exists(),
|
||||
"Cannot find template location: "
|
||||
+ resource
|
||||
+ " (please add some templates, check your FreeMarker configuration, or set "
|
||||
+ "spring.freemarker.checkTemplateLocation=false)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,9 +69,11 @@ public class VelocityAutoConfiguration {
|
||||
if (this.properties.isCheckTemplateLocation()) {
|
||||
Resource resource = this.resourceLoader.getResource(this.properties
|
||||
.getResourceLoaderPath());
|
||||
Assert.state(resource.exists(), "Cannot find template location: " + resource
|
||||
+ " (please add some templates "
|
||||
+ "or check your Velocity configuration)");
|
||||
Assert.state(
|
||||
resource.exists(),
|
||||
"Cannot find template location: "
|
||||
+ resource
|
||||
+ " (please add some templates, check your Velocity configuration, or set spring.velocity.checkTemplateLocation=false)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user