<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 文檔(一)

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

    Create a configuration instance
    建立一個配置實例

    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.
    首先你必須建立一個freemarker.template.Configuration類的實例并調(diào)整它的設(shè)置. 一個Configuration類實例是保存Freemarker應(yīng)用程序設(shè)置的中心首要. 同樣, 它決定著預(yù)編譯模版的建立和緩沖.

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

    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è)置為一個目錄
    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). 這是一個需要專門討論的話題
    // but just use this:
    // 不過現(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)在開始,你就可以使用這個Configuration實例了. 如果一個系統(tǒng)有多個模塊使用Freemarker的話, 毫無意外的, 它們最后使用它們各自私有的Configuration實例.

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

    評論

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

    好像少了點.....支持你樓主....加油..發(fā)更多的出來!!!  回復(fù)  更多評論   


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


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

    導(dǎo)航

    統(tǒng)計

    常用鏈接

    留言簿(2)

    隨筆分類

    隨筆檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 一级看片免费视频| 亚洲人成网站999久久久综合| eeuss影院www天堂免费| 午夜国产大片免费观看| 美女免费视频一区二区| 亚洲精品无码av天堂| 一级中文字幕免费乱码专区| 中文字幕精品无码亚洲字| 黄色视屏在线免费播放| 久久精品国产亚洲沈樵| 中文字幕免费视频一| 亚洲一区二区三区免费视频| 国产99视频精品免费观看7| 456亚洲人成影院在线观| 免费看a级黄色片| 免费一级毛片在线播放放视频| 亚洲AⅤ优女AV综合久久久| 国产99久久久国产精免费 | 国产91成人精品亚洲精品| 亚洲AⅤ优女AV综合久久久| 成在人线av无码免费高潮水| 久久久久久亚洲精品| 无码国产精品一区二区免费| 丰满亚洲大尺度无码无码专线| 免费国产a国产片高清| 两性色午夜免费视频| 亚洲国产成人超福利久久精品| 在线视频免费观看www动漫| 色吊丝性永久免费看码| 亚洲av无码不卡一区二区三区 | 女人毛片a级大学毛片免费| 男男gvh肉在线观看免费| 久久精品亚洲综合专区| 特级淫片国产免费高清视频| caoporn成人免费公开| 亚洲最大免费视频网| 免费一看一级毛片全播放| 在线看片免费人成视频播| 亚洲欧洲日产国码久在线| 亚洲线精品一区二区三区| 毛片免费视频播放|