List of usage examples for org.springframework.boot.autoconfigure.template TemplateLocation TemplateLocation
public TemplateLocation(String path)
From source file:com.breakidea.noah.configure.VelocityAutoConfiguration.java
@PostConstruct public void checkTemplateLocationExists() { if (this.properties.isCheckTemplateLocation()) { TemplateLocation location = new TemplateLocation(this.properties.getResourceLoaderPath()); if (!location.exists(this.applicationContext)) { logger.warn("Cannot find template location: " + location + " (please add some templates, check your Velocity " + "configuration, or set spring.velocity." + "checkTemplateLocation=false)"); }/* w w w . java 2s. c o m*/ } }
From source file:org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration.java
@PostConstruct public void checkTemplateLocationExists() { if (this.properties.isCheckTemplateLocation()) { TemplateLocation templatePathLocation = null; List<TemplateLocation> locations = new ArrayList<TemplateLocation>(); for (String templateLoaderPath : this.properties.getTemplateLoaderPath()) { TemplateLocation location = new TemplateLocation(templateLoaderPath); locations.add(location);//from www. j a v a 2 s . c om if (location.exists(this.applicationContext)) { templatePathLocation = location; break; } } if (templatePathLocation == null) { logger.warn("Cannot find template location(s): " + locations + " (please add some templates, " + "check your FreeMarker configuration, or set " + "spring.freemarker.checkTemplateLocation=false)"); } } }
From source file:org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration.java
@PostConstruct public void checkTemplateLocationExists() { if (this.mustache.isCheckTemplateLocation()) { TemplateLocation location = new TemplateLocation(this.mustache.getPrefix()); if (!location.exists(this.applicationContext)) { logger.warn("Cannot find template location: " + location + " (please add some templates, check your Mustache " + "configuration, or set spring.mustache." + "check-template-location=false)"); }// w ww . j av a 2 s .c om } }
From source file:org.springframework.boot.autoconfigure.thymeleaf.AbstractTemplateResolverConfiguration.java
@PostConstruct public void checkTemplateLocationExists() { boolean checkTemplateLocation = this.properties.isCheckTemplateLocation(); if (checkTemplateLocation) { TemplateLocation location = new TemplateLocation(this.properties.getPrefix()); if (!location.exists(this.applicationContext)) { logger.warn("Cannot find template location: " + location + " (please add some templates or check " + "your Thymeleaf configuration)"); }// w w w. j a va 2 s . c o m } }