Time too fast, all 20th days, seemingly not much progress Ah, seems to have a little understanding of freemarker, freemarker and Velocity and JSP are similar, template language, Freemarker will not embed Java code, Will do the MVC architecture requirements of the presentation layer and control layer separation, can be a good combination with the struts framework, should also be able to combine with spring. Today another day of the interface, seemingly learned something, as if to know how to write interface, write more naturally will, do not be discouraged. The development of the always oppressed ah. Learn something more. Freemarker:
Configuration cfg=NewConfiguration ();//To create a load configuration instanceCfg.setdirectoryfortemplateloading (NewFile ("Templates")); Map Root=NewHashMap (); List List=NewArrayList (); List.add (NewAddress ("China", "Beijing")); List.add (NewAddress ("United States", "New York")); Root.put ("User", "Laosan"); Root.put ("LST", list); Template T1= Cfg.gettemplate ("A.FTL"); Writer out=NewOutputStreamWriter (System.out); T1.process (root, out); Out.flush (); Out.close ();
Framework, architect, product manager.
20th Day How can I persist