Spring BeanDoc 是一個根據spring的bean配置文件生成文檔的工具
下載
springbeandoc:
ingbeandoctgz?version=
參考
graphviz:
exe
參考
apacheant:
antbinzip
安裝解壓springbeandoctgz和apacheantbinzip到d:
設置環境變量
ANT_HOME=D:\java\apacheant
Path=D:\jdk_\bin;D:\java\apacheant\bin;
運行graphvizexe安裝到D:\Programs\ATT
到D:\java\springbeandoc\src\org\springframework\beandoc\output\in下
增加中文資源文件labels_zhproperties 然後對照翻譯
#
# @since
ingenerated=beandoc \uF\u\uE
infilelist=files making up this application context
indescription=\uCF\uFF
inattributes=\uCE\u
inconstructorargs=\u\u\uC\u
inallTitle=\u\u Beans
insummaryTitle=beans\u\u
indetailTitle=beans\uBE\uC
ininnerbean=\uF\uD\u\uEbean
inhome=\u\u
insummary=\u\u
indetail=\uBE\uC
inabstractbean=\uBD\uC bean
indeps=\uFD\uD \uCE\u\uC \uC \uB\uCD \uCE\u
inbacktotop=\u\uDE\u\u\uE
inname=\uD\uB
inbean=bean
inargtypes=\uC\u\uCB\uB
#
再到D:\java\springbeandoc\下運行buildbat
到D:\java\springbeandoc\samples\
編輯beandocproperties
第行改為inlocale=zh
第行改為compilerdotExe=d:/Programs/ATT/GraphViz/bin/dotexe
清空 D:\java\springbeandoc\samples\jpetstore和 D:\java\springbeandoc\samples\petclinic復制spring配置文件
到D:\java\springbeandoc\samples\jpetstore
然後運行D:\java\springbeandoc\samples\runbeandocclibat
需要帶參數
D:\java\SPRING~\samples>runbeandocclibat beandocproperties
然後打開D:\java\springbeandoc\target\sampleoutput\l
就可以看到生成好的文檔了
From:http://tw.wingwit.com/Article/program/Java/ky/201311/28172.html