StringTemplate query = new StringTemplate("SELECT $column; separator=\",\"$ FROM $table$;");
query.SetAttribute("column", "name");
query.SetAttribute("column", "email");
query.SetAttribute("table", "User");
结果:SELECT name,email FROM User;
说明:这里的column有多个值,separator=","就表示每个值之间用,隔开
[责任编辑:jumbot]