Add config hint to template error messages
This commit is contained in:
parent
d2fc80b818
commit
85ac8f6b05
|
|
@ -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)");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue