Original: High-efficiency file copy Java code
Source code: Http://www.zuidaima.com/share/1593989887085568.htm
A small method in the tool class that encapsulates itself.
String str = "Elephant says it will {0} die, Ant says it will {0} die";
Template (str, "fat", "thin");
Output:
The elephant says it's going to get fat, and the ant says it will die thin.
Please download the code.
Can be implemented in some template language, but this code is a good interpretation of the template mechanism, like one.
Refer to the following code:
The simple Imitation freemarker template engine tool V2 version that I wrote in the project supports iterative Template4javaniu
The simple Imitation Freemarker template engine tool that I wrote in my project
Springmvc+freemarker's Simple Demo
Springmvc+freemarker Integration
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
High-efficiency file-copy Java code