All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xyz.erupt.tpl.engine.EnjoyEngine Maven / Gradle / Ivy

The newest version!
package xyz.erupt.tpl.engine;

import com.jfinal.kit.StrKit;
import com.jfinal.template.Engine;
import xyz.erupt.annotation.sub_erupt.Tpl;

import java.io.Writer;
import java.util.Map;

/**
 *
 * author: icefairy
 */
public class EnjoyEngine extends EngineTemplate {

    @Override
    public Tpl.Engine engine() {
        return Tpl.Engine.Enjoy;
    }

    @Override
    public Engine init() {
        Engine eng = new Engine();
        eng.addSharedMethod(StrKit.class);
        eng.setDevMode(true);
        return eng;
    }

    @Override
    public void render(Engine engine, String filePath, Map bindingMap, Writer out) {
        engine.getTemplate(filePath).render(bindingMap, out);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy