What is the Java template engine / API for creating text files?

I want to create files in different formats in Java - based web applications These files are plain text files without any HTML tags But the file needs some format. The file is on the left, middle, right or somewhere in the file (tab, space)

Template of placeholder java bean with data = text file

What Java template engine or API is suitable for this?

thank you!

Solution

You can view the string template

It looks like this:

import org.antlr.stringtemplate.*;
import org.antlr.stringtemplate.language.*;

StringTemplate hello = new StringTemplate("Hello,$name$",DefaultTemplateLexer.class);
hello.setAttribute("name","World");
System.out.println(hello.toString());
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>