diff --git a/app/templates/src/main/java/package/config/_ElasticSearchConfiguration.java b/app/templates/src/main/java/package/config/_ElasticSearchConfiguration.java
index <HASH>..<HASH> 100644
--- a/app/templates/src/main/java/package/config/_ElasticSearchConfiguration.java
+++ b/app/templates/src/main/java/package/config/_ElasticSearchConfiguration.java
@@ -17,8 +17,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 public class ElasticSearchConfiguration {
 
     @Bean
-    public ElasticsearchTemplate elasticsearchTemplate(Client client, ObjectMapper objectMapper) {
-        return new ElasticsearchTemplate(client, new CustomEntityMapper(objectMapper) );
+    public ElasticsearchTemplate elasticsearchTemplate(Client client, Jackson2ObjectMapperBuilder jackson2ObjectMapperBuilder) {
+        return new ElasticsearchTemplate(client, new CustomEntityMapper(jackson2ObjectMapperBuilder.createXmlMapper(false).build()));
     }
 
     public class CustomEntityMapper implements EntityMapper {
use dedicated object mapper for elasticsearch