@Document annotations do not directly pass the index name in a parameter. However, I found a job around.
In my configuration class, I created a Bean by returning a string. On this line, I entered the index name using @Value:
@Value("${etrali.indexname}") private String indexName; @Bean public String indexName(){ return indexName; }
After that, you can insert the index into the @Documentation annotation as follows:
@Document(indexName="#{@indexName}",type = "syslog_watcher")
It works for me, hope it helps you.
Best wishes
Bruno source share