<dependency> <groupId>com.github.codefollower</groupId> <artifactId>water</artifactId> <version>1.1.0</version> </dependency> <!DOCTYPE html> <html> <head> <title>${title}</title> </head> <body> <h1>${heading}</h1> <ul> #foreach($item in $list) <li>${item}</li> #end </ul> </body> </html> Water water = new Water(); Template template = water.load("path/to/template.wt"); String html = template.render();


上一篇:
下一篇:
切换中文