User Activity

  • Posted a comment on discussion Open Discussion on FreeMarker template engine

    I've got a problem with FreeMarker veresion 2.3.28 caching that I'm not sure how to solve. I'm using FreeMarker in a Springboot service that stores FreeMarker templates in a database. The problem that I have is that each message in the database supports up to 3 fields that can be processed with FreeMarker. The current FreeMarker code appears to assume one content string for each call to the loader which will insert 1 piece of content into the cache. I would like to return a message source that contains...

  • Modified a comment on discussion Open Discussion on FreeMarker template engine

    I figured this issue out. There was another Configuration class being autowired. I changed some naming and got the configuration to work. However, it still feels like I'm doing something fundamentally wrong. Sometimes the caching works and sometimes the getTemplate fails after the putTemplate method is called. I see some warning about the putTemplate not being thread safe in the API documenation. It also says don't call putTemplate after FreeMarker has started using this template loader. So it appears...

  • Posted a comment on discussion Open Discussion on FreeMarker template engine

    I figured this issue out. There was another Configuration class being autowired. I changed some naming and got the configuration to work. However, it still feels like I'm doing something fundamentally wrong. Sometimes the caching works and sometimes the getTemplate fails after the putTemplate method is called. I see some warning about the putTemplate not being thread safe in the API documenation. It also says don't call putTemplate after FreeMarker has started using this template loader. So it appears...

  • Posted a comment on discussion Open Discussion on FreeMarker template engine

    I'm using FreeMarker in a Springboot 1.5.9 micro web service and Spring 4.1.13. I'm setting the StringTemplateLoader in the Configuration in a Spring Configuration class as follows. @Bean public freemarker.template.Configuration freeMarkerConfiguration() { freemarker.template.Configuration cfg = new freemarker.template.Configuration( freemarker.template.Configuration.VERSION_2_3_28); cfg.unsetTemplateLoader(); cfg.setTemplateLoader(new StringTemplateLoader()); return cfg; My application is able to...

View All

Personal Data

Username:
keberts
Joined:
2019-03-28 19:37:55

Projects

  • No projects to display.

Personal Tools