velocitytest.java

来自「struts+spring+hibernate自创框架」· Java 代码 · 共 22 行

JAVA
22
字号
package com.pegasus.framework.test;


public class VelocityTest {
	public static void main(String[] args) throws Exception {
		/* first, get and initialize an engine 
		VelocityEngine ve = new VelocityEngine();
		ve.init();
		/* next, get the Template 
		Template t = ve.getTemplate("hellosite.vm");
		 create a context and add data 
		VelocityContext context = new VelocityContext();
		context.put("name", "Eiffel Qiu");
		context.put("site", "http://www.j2medev.com");
		 now render the template into a StringWriter 
		StringWriter writer = new StringWriter();
		t.merge(context, writer);
		 show the World 
		System.out.println(writer.toString());*/
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?