<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Natlive's blog

    A long way and dream.

     

    自翻譯·Freemarker 文檔(一)

    自己的英語(yǔ)水平只有一級(jí)半,為了努力學(xué)好英語(yǔ),現(xiàn)在一天一個(gè)翻譯,先從Freemarker文檔開始,有不對(duì)的地方多謝指正拋磚。

    Create a configuration instance
    建立一個(gè)配置實(shí)例

    First you have to create a freemarker.template.Configuration instance and adjust its settings. A Configuration instance is a central place to store the appliction level setting of FreeMarker. Also, it deals with the creation and caching of pre-parsed templates.
    首先你必須建立一個(gè)freemarker.template.Configuration類的實(shí)例并調(diào)整它的設(shè)置. 一個(gè)Configuration類實(shí)例是保存Freemarker應(yīng)用程序設(shè)置的中心首要. 同樣, 它決定著預(yù)編譯模版的建立和緩沖.

    Probably you will do it only once at the beginning of the application(possibly servlet) life-cycle:
    也許你只需要在程序開始時(shí),僅僅只需調(diào)用一次下面的代碼,并且在程序的整個(gè)生命周期都可用:

    Configuration cfg = new Configuration();
    // Specify the data source where the template files come from.
    // 指定模板的數(shù)據(jù)源
    // Here I set a file directory for it:
    // 在這里我設(shè)置為一個(gè)目錄
    cfg.setDirectoryForTemplateLoading(new Fil("/where/you/store/templates"));
    // Specify how templates will see the data model. This is an advanced topic
    // 指定模板怎么讀取數(shù)據(jù)模型(data model). 這是一個(gè)需要專門討論的話題
    // but just use this:
    // 不過(guò)現(xiàn)在你可以這樣做
    cfg.setObjectWrapper(new DefaultObjectWrapper());  

    From now you should use this single configuration instance. Note however that if a system has multiple independent components that use FreeMarker, then of course they will use their own private Configuration instance.
    現(xiàn)在開始,你就可以使用這個(gè)Configuration實(shí)例了. 如果一個(gè)系統(tǒng)有多個(gè)模塊使用Freemarker的話, 毫無(wú)意外的, 它們最后使用它們各自私有的Configuration實(shí)例.

    posted on 2007-08-13 09:51 狂龍 閱讀(996) 評(píng)論(1)  編輯  收藏 所屬分類: Freemarker

    評(píng)論

    # re: 自翻譯·Freemarker 文檔(一) 2007-09-10 16:29 wojiushicai

    好像少了點(diǎn).....支持你樓主....加油..發(fā)更多的出來(lái)!!!  回復(fù)  更多評(píng)論   


    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     

    導(dǎo)航

    統(tǒng)計(jì)

    常用鏈接

    留言簿(2)

    隨筆分類

    隨筆檔案

    搜索

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    主站蜘蛛池模板: ZZIJZZIJ亚洲日本少妇JIZJIZ| 最近中文字幕无吗免费高清| 亚洲毛片av日韩av无码| 日韩色视频一区二区三区亚洲 | 破了亲妺妺的处免费视频国产 | 在线观看免费人成视频色| 亚洲欧洲国产经精品香蕉网| 日本免费网站视频www区| 亚洲AV色吊丝无码| 欧美a级成人网站免费| 亚洲男人的天堂网站| 免费观看国产小粉嫩喷水| 免费一级毛片在线播放放视频 | 性感美女视频免费网站午夜 | 一二三四影视在线看片免费 | 亚洲美女人黄网成人女| 在线观看的免费网站| 亚洲av无码成人精品区一本二本 | 亚洲欧洲日韩极速播放| 免费一级一片一毛片| 成人免费一区二区三区| 亚洲欧洲第一a在线观看| 国产精品69白浆在线观看免费| 亚洲国产AV一区二区三区四区| 免费在线观看你懂的| 国内永久免费crm系统z在线 | 91精品免费在线观看| 国产精品亚洲а∨无码播放不卡| 亚洲人成网站18禁止一区| 久久免费精彩视频| 亚洲伊人久久大香线蕉AV| 亚洲欧洲国产成人综合在线观看| 玖玖在线免费视频| 亚洲国产精品成人午夜在线观看 | 日韩av无码久久精品免费| 中文文字幕文字幕亚洲色| 亚洲欧洲国产成人综合在线观看| 亚洲国产精品免费在线观看| 久久久久久亚洲av无码蜜芽| 亚洲av最新在线网址| 国产精品色午夜免费视频|