INNER CODE UNIT · Java
initTemplates
dadoonet/spring-elasticsearch · src/main/java/fr/pilato/spring/elasticsearch/ElasticsearchClientFactoryBean.java:522
private void initTemplates() throws Exception {
logger.debug("Initializing component templates");
String[] componentTemplates = discoverFromClasspath(autoscan, this.componentTemplates, classpathRoot, SettingsFinder.Defaults.ComponentTemplatesDir);
if (componentTemplates != null) {
for (String componentTemplate : componentTemplates) {
logger.debug("Initializing component template {}", componentTemplate);
Assert.hasText(componentTemplate, "Can not read component template in ["
+ componentTemplate
+ "]. Check that component template is not empty.");
createComponentTemplate(lowLevelClient, classpathRoot, componentTemplate);
}
}
logger.debug("Initializing index templates");
String[] indexTemplates = discoverFromClasspath(autoscan, this.indexTemplates, classpathRoot, SettingsFinder.Defaults.IndexTemplatesDir);
if (indexTemplates != null) {
for (String indexTemplate : indexTemplates) {
logger.debug("Initializing index template {}", indexTemplate);
Assert.hasText(indexTemplate, "Can not read component template in ["