After studying the knowledge of the template engine freemarker in generating Word files, the blogger uses eclipse for development and uses the built-in JSP framework to edit FTL files,
Before editing the FTL file, if your eclipse does not specify the FTL editing method, you will be prompted to install an FTL template editor or use texteditor for editing (texteditor is not recommended ), I didn't choose to install the FTL template editor here, So I skipped it.
1. OpenEclipseEnterPreferences
2. In the pop-up dialog box, selectGenera l --> editors --> File AssociationsOption
3. ClickFiletypesAdd template file type on the right
4. After adding the file type, clickAssociated editorsClick the button on the right to add*. FTL EditorHere we useJSP Editor
5. the above operations specify. FTL file editor, And thenJSP EditorAdd in. FTL file typeClickContent typesSet
6. FindText --> JSP Fragment
7. ClickAdd buttonNew*. FTL type, SetEncoding format (default encoding)ChangeUtf_8You can.
8. Last clickApply and closeYou can.
To open the FTL file, pressCTRL + Shift + F formatThe template file looks much more convenient.
Original article: 79148327
[Switch] settings: FTL template file editor