package org.synyx.urlaubsverwaltung;

import no.api.freemarker.java8.Java8ObjectWrapper;
import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration;
import org.springframework.boot.autoconfigure.freemarker.FreeMarkerProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Configuration
public class FreemarkerConfig extends FreeMarkerAutoConfiguration {

    private final freemarker.template.Configuration configuration;

    public FreemarkerConfig(ApplicationContext applicationContext, FreeMarkerProperties properties, freemarker.template.Configuration configuration) {
        super(applicationContext, properties);
        this.configuration = configuration;
    }

    @PostConstruct
    public void postConstruct() {
        configuration.setObjectWrapper(new Java8ObjectWrapper(freemarker.template.Configuration.getVersion()));
    }
}

@@ -404,16 +404,81 @@
 truct;%0A%0A
+import static freemarker.template.Configuration.VERSION_2_3_30;%0A%0A
 @Configu
@@ -989,54 +989,22 @@
 per(
-freemarker.template.Configuration.getVersion()
+VERSION_2_3_30
 ));%0A

Fix freemarker incompatibleImprovements