/template-matcher

Template loader for apache StrSubstitutor that evict LRU templates in a certain interval

Primary LanguageJavaMIT LicenseMIT

Template Matcher

Load templates from disc and use apache StrSubstitutor to match params and template attributes. If configured to auto purge, a dedicated daemon is created to evict LRU loaded template after elapsed configured idle time.

Usage:

        Map<String,String> params = new HashMap<>();
        
        TemplateMatcher matcher = TemplateMatcher.single(true,60,TimeUnit.MINUTES);
        matcher.template("<path-to-template>",params);