是否有任何资源可用于创建Web API,如Twitter API或Facebook API.我想为我的网站创建一个Web API.
谢谢...
我有这样的速度模板:
+-----------------------------------------------------------+-------------+-------------+-------------+-------------+
| $totalPel Pelanggan | $totalBk | $totalAdm | $totalTag | $totalTotal |
+-----------------------------------------------------------+-------------+-------------+-------------+-------------+
Run Code Online (Sandbox Code Playgroud)
当我输入 $totalPel -> 100 时,结果是:
+-----------------------------------------------------------+-------------+-------------+-------------+-------------+
| 100 Pelanggan | $totalBk | $totalAdm | $totalTag | $totalTotal |
+-----------------------------------------------------------+-------------+-------------+-------------+-------------+
Run Code Online (Sandbox Code Playgroud)
其实我想得到这样的结果:
+-----------------------------------------------------------+-------------+-------------+-------------+-------------+
| 100 Pelanggan | $totalBk | $totalAdm | $totalTag | $totalTotal |
+-----------------------------------------------------------+-------------+-------------+-------------+-------------+
Run Code Online (Sandbox Code Playgroud)
任何人都可以告诉我如何制作它?
我使用这个java代码:
Velocity.init();
VelocityContext context = new VelocityContext();
context.put("totalPel", 100);
Template template = Velocity.getTemplate("LaporanTagihan.txt");
StringWriter writer = new StringWriter();
template.merge(context, writer);
System.out.println(writer.toString());
Run Code Online (Sandbox Code Playgroud)