1.下载:
spring-beandoc-0.7.0:
http://opensource.atlassian.com/confluence/spring/download/attachments/993/spring-beandoc-0.7.0.tgz?version=1
参考: http://opensource.atlassian.com/confluence/spring/display/BDOC/Home
graphviz-2.8:
http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-2.8.exe
参考: http://www.graphviz.org/Download_windows.php
apache-ant-1.6.5:
http://www.eu.apache.org/dist/ant/binaries/apache-ant-1.6.5-bin.zip
2.安装,解压spring-beandoc-0.7.0.tgz和apache-ant-1.6.5-bin.zip到d:http://java.chinaitlab.com/
设置环境变量:
ANT_HOME=D:/java/apache-ant-1.6.5
Path=D:/jdk1.5.0_06/bin;D:/java/apache-ant-1.6.5/bin;........
运行graphviz-2.8.exe,安装到D:/Programs/ATT。
3.到D:/java/spring-beandoc-0.7.0/src/org/springframework/beandoc/output/i18n下
增加中文资源文件labels_zh.properties ,然后对照翻译,
#-----------------------------------------
# @since 1.0
i18n-generated=beandoc /u751F/u6210/u4E86
i18n-filelist=files making up this application context
i18n-description=/u63CF/u8FF0
i18n-attributes=/u5C5E/u6027
i18n-constrUCtorargs=/u6784/u9020/u53C2/u6570
i18n-allTitle=/u6240/u6709 Beans
i18n-summaryTitle=beans/u6458/u8981
i18n-detailTitle=beans/u8BE6/u60C5
i18n-innerbean=/u533F/u540D/u5185/u90E8bean
i18n-home=/u9996/u9875
i18n-summary=/u6458/u8981
i18n-detail=/u8BE6/u60C5
i18n-abstractbean=/u62BD/u8C61 bean
i18n-deps=/u4F9D/u8D56, /u5C5E/u6027/u503C /u548C /u65B9/u6CD5 /u6CE8/u5165
i18n-backtotop=/u9000/u56DE/u5230/u9876/u90E8
i18n-name=/u540D/u5B57
i18n-bean=bean
i18n-argtypes=/u53C2/u6570/u7C7B/u578B
#-----------------------------------------
再到D:/java/spring-beandoc-0.7.0/下运行build.bat。
4.到D:/java/spring-beandoc-0.7.0/samples/
编辑beandoc.properties,
第50行改为:i18n.locale=zh
第60行改为:compiler.dotExe=d:/Programs/ATT/GraphViz/bin/dot.exe
5.清空 D:/java/spring-beandoc-0.7.0/samples/jpetstore和 D:/java/spring-beandoc-0.7.0/samples/petclinic,复制spring配置文件
到D:/java/spring-beandoc-0.7.0/samples/jpetstore
6.然后运行D:/java/spring-beandoc-0.7.0/samples/runbeandoc-cli.bat
需要带参数:
D:/java/SPRING~1.0/samples>runbeandoc-cli.bat beandoc.properties
7.然后打开D:/java/spring-beandoc-0.7.0/target/sample-output/index.Html.
就可以看到生成好的文档了。
新闻热点
疑难解答