custom-header

Dropwizard with Scala and Freemarker

Dropwizard with Scala and Freemarker

Dropwizard works quite smoothly together with Scala  as long as you use it as a REST service.

As soon as you are planning to use their template capabilities, you will definitely run into a number of challenges.

Freemarker processes JavaBeans during its wrapping process and generates properties we use and access in the respective templates. Scala does not provide neither Getter nor Setter and the Freemarker ObjectWrapper thus struggles to convert it something it can process.

The code uploaded to that Github repository solves the problem by providing a custom ObjectWrapper for Freemarker.

Github Repo

https://github.com/tmaus/dropwizard-views-sfreemarker

Author: Thorsten Maus

Grown up in Berlin, Germany
Starting coding with 12 years on a Z80 processor
First contact with the internet in 1994 in Dublin

Living in Singapore

CTO Jobs:
helloPay (current)
Lazada (Special Projects)
Zalora
eDarling
iLove

Leave a Reply

Your email address will not be published. Required fields are marked *

Shares