wangking873 / spring-framework-reference

0 Watch 1 Star 0 Fork 227
加入码云
与超过 300 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
Spring4.x中文参考文档 展开 收起

一宁 最后提交于 Update README.md
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README.md 22.85 KB

#Spring框架参考文档 翻译

##文档地址

中文文档:http://spring.cndocs.tk/

英文文档:http://spring.oschina.mopaas.com/html_en/

##基本说明

Spring文档为adoc格式,文件已经按基本的章节和内容拆分为大量的adoc子文件,该文件在src/asciidoc/chapter路径下。

每一个adco文件内容在20行~200行左右,行数少的文件纯翻译内容较多,行数多的文件包含大量不需要进行翻译的代码。

##参与翻译

准备参与前,请仔细考虑自己能否抽出一定的时间来参与翻译,我们要求每月至少翻译完一个adoc文件(20行~200行)!

  1. 首先加QQ群Team翻译小组:111763438

  2. 进群后,查看群公告的Team邀请链接,通过链接加入Team

  3. 然后从群共享下载参与Spring文档翻译.pdf(或.doc版本)查看。

##I. 全部章节(加粗内容为已分配的章节)

  • 1.introduction.adoc -
  • 【完成】2.spring-whats-new.adoc - isea533
  • 2.1.spring-whats-new.adoc -
  • 【完成】3.beans.adoc - isea533
  • 【完成】3.1.beans.adoc(5.1. Introduction&5.2. Container overview) - isea533
  • 【完成】3.2.beans.adoc(5.3. Bean overview) - isea533
  • 【完成】3.3.beans.adoc(5.4. Dependencies) - reeco
  • 3.4.beans.adoc(5.5. Bean scopes) -
  • 3.4.1.beans.adoc(5.5. Bean scopes) -
  • 3.4.2.beans.adoc(5.5. Bean scopes) -
  • 3.4.3.beans.adoc(5.5. Bean scopes) -
  • 3.4.4.beans.adoc(5.5. Bean scopes) -
  • 【完成】3.5.beans.adoc(5.6. Customizing the nature of a bean) - avvei
  • 【完成】3.6.beans.adoc(5.7. Bean definition inheritance) - 令狐流水
  • 【完成】3.7.beans.adoc(5.8. Container Extension Points) - 令狐流水
  • 3.7.1.beans.adoc(5.8. Container Extension Points) -
  • 3.7.2.beans.adoc(5.8. Container Extension Points) -
  • 3.7.3.beans.adoc(5.8. Container Extension Points) -
  • 3.7.4.beans.adoc(5.8. Container Extension Points) -
  • 3.8.beans.adoc(5.9. Annotation-based container configuration)
  • 3.8.1.beans.adoc(5.9. Annotation-based container configuration)
  • 3.8.2.beans.adoc(5.9. Annotation-based container configuration)
  • 3.8.3.beans.adoc(5.9. Annotation-based container configuration)
  • 3.8.4.beans.adoc(5.9. Annotation-based container configuration)
  • 3.9.beans.adoc(5.10. Classpath scanning and managed components) -
  • 3.9.1.beans.adoc(5.10. Classpath scanning and managed components) -
  • 3.9.2.beans.adoc(5.10. Classpath scanning and managed components) -
  • 3.9.3.beans.adoc(5.10. Classpath scanning and managed components) -
  • 3.9.4.beans.adoc(5.10. Classpath scanning and managed components) -
  • 3.10.beans.adoc(5.11. Using JSR 330 Standard Annotations) -
  • 3.11.beans.adoc(5.12. Java-based container configuration) -
  • 3.11.1.beans.adoc(5.12. Java-based container configuration) -
  • 【完成】3.11.2.beans.adoc(5.12. Java-based container configuration)- isea533
  • 3.11.3.beans.adoc(5.12. Java-based container configuration) -
  • 3.11.4.beans.adoc(5.12. Java-based container configuration) -
  • 3.11.5.beans.adoc(5.12. Java-based container configuration) -
  • 3.11.6.beans.adoc(5.12. Java-based container configuration) -
  • 3.11.7.beans.adoc(5.12. Java-based container configuration) -
  • 3.11.8.beans.adoc(5.12. Java-based container configuration) -
  • 3.11.9.beans.adoc(5.12. Java-based container configuration) -
  • 【完成】3.12.beans.adoc(5.13. Environment abstraction)- isea533
  • 3.12.1.beans.adoc(5.13. Environment abstraction)- isea533
  • 【完成】3.13.beans.adoc(5.14. Registering a LoadTimeWeaver)- isea533
  • 3.14.beans.adoc(5.15. Additional Capabilities of the ApplicationContext) -
  • 3.14.1.beans.adoc(5.15. Additional Capabilities of the ApplicationContext) -
  • 3.14.2.beans.adoc(5.15. Additional Capabilities of the ApplicationContext) -
  • 3.15.beans.adoc(5.16. The BeanFactory) -
  • 【完成】4.resources.adoc - tianya
  • 【完成】5.validation.adoc - jassen
  • 5.1.validation.adoc -
  • 5.2.validation.adoc -
  • 5.3.validation.adoc -
  • 5.4.validation.adoc -
  • 5.5.validation.adoc -
  • 5.6.validation.adoc -
  • 5.7.validation.adoc -
  • 5.8.validation.adoc -
  • 5.9.validation.adoc -
  • 5.10.validation.adoc -
  • 5.11.validation.adoc -
  • 5.12.validation.adoc -
  • 【完成】7.expressions.adoc - Ji.K'
  • 8.aop.adoc -
  • 8.1.aop.adoc -
  • 8.2.aop.adoc -
  • 8.2.1.aop.adoc -
  • 8.2.2.aop.adoc -
  • 8.2.3.aop.adoc -
  • 8.3.aop.adoc -
  • 8.3.1.aop.adoc -
  • 8.3.2.aop.adoc -
  • 8.3.3.aop.adoc -
  • 8.3.4.aop.adoc -
  • 8.3.5.aop.adoc -
  • 8.4.aop.adoc -
  • 8.5.aop.adoc -
  • 8.6.aop.adoc -
  • 8.7.aop.adoc -
  • 8.7.1.aop.adoc -
  • 8.7.2.aop.adoc -
  • 8.8.aop.adoc -
  • 8.9.aop.adoc -
  • 8.10.aop.adoc -
  • 8.11.aop.adoc -
  • 8.12.aop.adoc -
  • 8.12.1.aop.adoc -
  • 8.12.2.aop.adoc -
  • 8.13.aop.adoc -
  • 8.14.aop.adoc -
  • 8.15.aop.adoc -
  • 8.15.1.aop.adoc -
  • 9.aop-api.adoc(10.1. Introduction) -
  • 9.1.aop-api.adoc(10.2. Pointcut API in Spring) -
  • 9.1.1.aop-api.adoc(10.2. Pointcut API in Spring) -
  • 【翻译不完整,并且加入了无关的时间】9.2.aop-api.adoc(10.3. Advice API in Spring) - 陈鹏烨
  • 【完成】9.3.aop-api.adoc(10.4. Advisor API in Spring) - 528015857
  • 9.3.1.aop-api.adoc(10.4. Advisor API in Spring) -
  • 9.3.2.aop-api.adoc(10.4. Advisor API in Spring) -
  • 9.3.3.aop-api.adoc(10.4. Advisor API in Spring) -
  • 【完成】9.4.aop-api.adoc(10.6. Concise proxy definitions) - 阿信
  • 【完成】9.5.aop-api.adoc(10.7. Creating AOP proxies) - 阿信
  • 【完成】9.6.aop-api.adoc(10.8. Manipulating advised objects) - 阿信
  • 9.7.aop-api.adoc(10.9. Using the "auto-proxy" facility) -
  • 9.7.1.aop-api.adoc(10.9. Using the "auto-proxy" facility) -
  • 9.7.2.aop-api.adoc(10.9. Using the "auto-proxy" facility) -
  • 9.8.aop-api.adoc(10.10. Using TargetSources) -
  • 9.8.1.aop-api.adoc(10.10. Using TargetSources) -
  • 9.8.2.aop-api.adoc(10.10. Using TargetSources) -
  • 【完成】9.9.aop-api.adoc(10.11. Defining new Advice types) - isea533
  • 【完成】10.testing.adoc(11. Introduction) - 坚冰
  • 【完成】10.1.testing.adoc(11.3. Integration Testing) - 坚冰
  • 【完成】10.2.testing.adoc(11.3.3. JDBC Testing Support) - 坚冰
  • 【完成】10.3.testing.adoc(11.3.4. Annotations) - 坚冰
  • 【完成】10.4.testing.adoc(11.3.5. Spring TestContext Framework) - 坚冰
  • 【完成】10.4.1.testing.adoc(11.3.5.3. Context management) - 坚冰
  • 10.4.1.1.testing.adoc(11.3.5.3. Context management) -
  • 10.4.1.2.testing.adoc(11.3.5.3. Context management) -
  • 10.4.1.3.testing.adoc(11.3.5.3. Context management) -
  • 10.4.1.4.testing.adoc(11.3.5.3. Context management) -
  • 10.4.2.testing.adoc(11.3.5.4. DI) -
  • 10.4.2.1.testing.adoc(11.3.5.4. DI) -
  • 10.4.2.2.testing.adoc(11.3.5.4. DI) -
  • 10.4.2.3.testing.adoc(11.3.5.4. DI) -
  • 10.4.2.4.testing.adoc(11.3.5.4. DI) -
  • 10.4.2.5.testing.adoc(11.3.5.4. DI) -
  • 10.4.2.6.testing.adoc(11.3.5.4. DI) -
  • 10.4.2.7.testing.adoc(11.3.5.4. DI) -
  • 10.4.2.8.testing.adoc(11.3.5.4. DI) -
  • 10.5.testing.adoc(11.3.6. Spring MVC Test Framework) -
  • 10.5.1.testing.adoc(11.3.6. Spring MVC Test Framework) -
  • 10.5.2.testing.adoc(11.3.6. Spring MVC Test Framework) -
  • 10.5.3.testing.adoc(11.3.6. Spring MVC Test Framework) -
  • 10.5.4.testing.adoc(11.3.6. Spring MVC Test Framework) -
  • 10.6.testing.adoc(11.3.7. PetClinic Example) -
  • 【完成】11.spring-data-tier.adoc - 阿信
  • 12.dao.adoc -
  • 13.jdbc.adoc -
  • 13.1.jdbc.adoc -
  • 13.2.jdbc.adoc -
  • 13.3.jdbc.adoc -
  • 13.4.jdbc.adoc -
  • 13.5.jdbc.adoc -
  • 13.6.jdbc.adoc -
  • 13.7.jdbc.adoc -
  • 13.8.jdbc.adoc -
  • 13.9.jdbc.adoc -
  • 13.10.jdbc.adoc -
  • 13.11.jdbc.adoc -
  • 13.12.jdbc.adoc -
  • 13.13.jdbc.adoc -
  • 13.14.jdbc.adoc -
  • 13.15.jdbc.adoc -
  • 13.16.jdbc.adoc -
  • 13.17.jdbc.adoc -
  • 13.18.jdbc.adoc - 一宁
  • 13.19.jdbc.adoc - 一宁
  • 13.20.jdbc.adoc -
  • 13.21.jdbc.adoc -
  • 13.22.jdbc.adoc -
  • 13.23.jdbc.adoc -
  • 13.24.jdbc.adoc -
  • 13.25.jdbc.adoc -
  • 【完成】14.orm.adoc - waylau
  • 15.oxm.adoc -
  • 15.1.oxm.adoc -
  • 15.2.oxm.adoc -
  • 15.3.oxm.adoc -
  • 15.4.oxm.adoc -
  • 15.5.oxm.adoc -
  • 15.6.oxm.adoc -
  • 【完成】16.spring-web.adoc - tianya
  • 16.1.spring-web.adoc -
  • 16.2.spring-web.adoc -
  • 16.3.spring-web.adoc -
  • 16.4.spring-web.adoc -
  • 16.5.spring-web.adoc -
  • 16.6.spring-web.adoc -
  • 16.7.spring-web.adoc -
  • 16.8.spring-web.adoc -
  • 16.9.spring-web.adoc -
  • 16.10.spring-web.adoc -
  • 16.11.spring-web.adoc -
  • 16.12.spring-web.adoc -
  • 16.13.spring-web.adoc -
  • 16.14.spring-web.adoc -
  • 16.15.spring-web.adoc -
  • 【完成】17.view.adoc - 顾浩
  • 17.1.view.adoc -
  • 17.2.view.adoc -
  • 17.3.view.adoc -
  • 17.4.view.adoc -
  • 17.5.view.adoc -
  • 17.6.view.adoc -
  • 17.7.view.adoc -
  • 17.8.view.adoc -
  • 17.9.view.adoc -
  • 17.10.view.adoc -
  • 17.11.view.adoc -
  • 17.12.view.adoc -
  • 17.13.view.adoc -
  • 17.14.view.adoc -
  • 17.15.view.adoc -
  • 17.16.view.adoc -
  • 17.17.view.adoc -
  • 17.18.view.adoc -
  • 17.19.view.adoc -
  • 17.20.view.adoc -
  • 17.21.view.adoc -
  • 【完成】18.web-integration.adoc - 阿信
  • 19.portlet.adoc -
  • 19.1.portlet.adoc -
  • 19.2.portlet.adoc -
  • 19.3.portlet.adoc -
  • 19.4.portlet.adoc -
  • 19.5.portlet.adoc -
  • 19.6.portlet.adoc -
  • 19.7.portlet.adoc -
  • 19.8.portlet.adoc -
  • 19.9.portlet.adoc -
  • 19.10.portlet.adoc -
  • 19.11.portlet.adoc -
  • 19.12.portlet.adoc -
  • 19.13.portlet.adoc -
  • 19.14.portlet.adoc -
  • 19.15.portlet.adoc -
  • 【翻译不完整,包含英中对照】20.websocket.adoc - zipu888
  • 21.spring-integration.adoc -
  • 21.1.spring-integration.adoc -
  • 21.2.spring-integration.adoc -
  • 21.3.spring-integration.adoc -
  • 21.4.spring-integration.adoc -
  • 21.5.spring-integration.adoc -
  • 21.6.spring-integration.adoc -
  • 21.7.spring-integration.adoc -
  • 21.8.spring-integration.adoc -
  • 21.9.spring-integration.adoc -
  • 21.10.spring-integration.adoc -
  • 21.11.spring-integration.adoc -
  • 21.12.spring-integration.adoc -
  • 21.13.spring-integration.adoc -
  • 22.ejb.adoc -
  • 22.1.ejb.adoc -
  • 22.2.ejb.adoc -
  • 【差一小段】23.jms.adoc - siriusckx
  • 23.1.jms.adoc -
  • 23.2.jms.adoc -
  • 23.3.jms.adoc -
  • 23.4.jms.adoc -
  • 23.5.jms.adoc -
  • 23.6.jms.adoc -
  • 23.7.jms.adoc -
  • 23.8.jms.adoc -
  • 23.9.jms.adoc -
  • 23.10.jms.adoc -
  • 24.jmx.adoc -
  • 24.1.jmx.adoc -
  • 24.2.jmx.adoc -
  • 24.3.jmx.adoc -
  • 24.4.jmx.adoc -
  • 24.5.jmx.adoc -
  • 24.6.jmx.adoc -
  • 24.7.jmx.adoc -
  • 24.8.jmx.adoc -
  • 24.9.jmx.adoc -
  • 24.10.jmx.adoc -
  • 24.11.jmx.adoc -
  • 24.12.jmx.adoc -
  • 24.13.jmx.adoc -
  • 24.14.jmx.adoc -
  • 24.15.jmx.adoc -
  • 25.cci.adoc -
  • 25.1.cci.adoc -
  • 25.2.cci.adoc -
  • 25.3.cci.adoc -
  • 25.4.cci.adoc -
  • 25.5.cci.adoc -
  • 25.6.cci.adoc -
  • 25.7.cci.adoc -
  • 25.8.cci.adoc -
  • 25.9.cci.adoc -
  • 25.10.cci.adoc -
  • 25.11.cci.adoc -
  • 25.12.cci.adoc -
  • 25.13.cci.adoc -
  • 25.14.cci.adoc -
  • 【完成】26.mail.adoc - 抢小孩糖吃
  • 27.scheduling.adoc -
  • 27.1.scheduling.adoc -
  • 27.2.scheduling.adoc -
  • 27.3.scheduling.adoc -
  • 27.4.scheduling.adoc -
  • 27.5.scheduling.adoc -
  • 27.6.scheduling.adoc -
  • 27.7.scheduling.adoc -
  • 27.8.scheduling.adoc -
  • 【完成】27.9.scheduling.adoc - isea533
  • 27.10.scheduling.adoc -
  • 28.dynamic-language.adoc -
  • 28.1.dynamic-language.adoc -
  • 28.2.dynamic-language.adoc -
  • 28.3.dynamic-language.adoc -
  • 28.4.dynamic-language.adoc -
  • 28.5.dynamic-language.adoc -
  • 28.6.dynamic-language.adoc -
  • 28.7.dynamic-language.adoc -
  • 28.8.dynamic-language.adoc -
  • 28.9.dynamic-language.adoc -
  • 28.10.dynamic-language.adoc -
  • 【完成】29.cache.adoc - isea533
  • 29.1.cache.adoc -
  • 29.2.cache.adoc -
  • 29.3.cache.adoc -
  • 29.4.cache.adoc -
  • 29.5.cache.adoc -
  • 29.6.cache.adoc -
  • 29.7.cache.adoc -
  • 29.8.cache.adoc -
  • 29.9.cache.adoc -
  • 29.10.cache.adoc -
  • 29.11.cache.adoc -
  • 29.12.cache.adoc -
  • 29.13.cache.adoc -
  • 31.classic-spring.adoc -
  • 31.1.classic-spring.adoc -
  • 31.2.classic-spring.adoc -
  • 31.3.classic-spring.adoc -
  • 31.4.classic-spring.adoc -
  • 32.classic-aop-spring.adoc -
  • 32.1.classic-aop-spring.adoc -
  • 32.2.classic-aop-spring.adoc -
  • 32.3.classic-aop-spring.adoc -
  • 32.4.classic-aop-spring.adoc -
  • 32.5.classic-aop-spring.adoc -
  • 32.6.classic-aop-spring.adoc -
  • 32.7.classic-aop-spring.adoc -
  • 32.8.classic-aop-spring.adoc -
  • 32.9.classic-aop-spring.adoc -
  • 32.10.classic-aop-spring.adoc -
  • 32.11.classic-aop-spring.adoc -
  • 32.12.classic-aop-spring.adoc -
  • 32.13.classic-aop-spring.adoc -
  • 32.14.classic-aop-spring.adoc -
  • 32.15.classic-aop-spring.adoc -
  • 32.16.classic-aop-spring.adoc -
  • 32.17.classic-aop-spring.adoc -
  • 33.xsd-config.adoc -
  • 33.1.xsd-config.adoc -
  • 33.2.xsd-config.adoc -
  • 33.3.xsd-config.adoc -
  • 33.4.xsd-config.adoc -
  • 33.5.xsd-config.adoc -
  • 33.6.xsd-config.adoc -
  • 33.7.xsd-config.adoc -
  • 34.extensible-xml.adoc -
  • 34.1.extensible-xml.adoc -
  • 34.2.extensible-xml.adoc -
  • 34.3.extensible-xml.adoc -
  • 34.4.extensible-xml.adoc -
  • 35.spring.tld.adoc -

##II. 翻译一般要求

为了大家在翻译的时候文件格式正确,而且翻译比较一致,需要遵守一定的要求。

###第一条、 adoc语法

Spring文件使用的adoc语法,和markdow比较接近。

只有大概了解这种语法才能在翻译的时候知道应该翻译什么,那些不应该翻译。所以要求大家简单了解adoc语法。

asciidoc语法--快速参考:

http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/

asciidoc中文文档:

http://houqp.github.io/wbwa/wbwa.html

建议大家一定看看,否则翻译后的文档会出现一些格式错误。

为了便于查询adoc的预览效果,可以安装Chrome插件:

https://github.com/asciidoctor/asciidoctor-chrome-extension

由于文档中的换行对英文来说只是一个空格,但是对中文就会有影响,所以大家在翻译的时候可以先有换行,翻译完这一个段落后,再将换行删除。

###第二条、 代码部分

在adoc语法中:

[source,xml,indent=0]
[subs="verbatim,quotes,attributes"]
----
	<dependencies>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>{spring-version}</version>
			<scope>runtime</scope>
		</dependency>
	</dependencies>
----

这种是代码内容,这里面的内容一般不需要做任何修改。但是如果代码中有注释内容,需要把注释翻译成中文。

###第三条、 词库

对于一些英语中专有的词汇,不需要进行翻译的可以不翻译。

例如:Spring不需要翻译,list,map等等不需要翻译,像bean也不用翻译。

具体遇到那些词可以在群内讨论。

##III. 编译本项目

目录结构

为了便于独立翻译,已经手工将index.adocappendix.adoc进行了拆分。拆分后的内容在src\asciidoc\chaptor中。

Spring项目使用的Gradle,编译文档也需要用到Gradle,所以如果你想编译本项目,需要按如下进行操作:

###1. 下载并配置Gradle

按照官方的进行配置即可,主要是bin加入Path

###2. 在项目的根目录执行命令

gradle

然后会下载项目依赖,其中jruby有20多M,整体下载速度一般(使用的osc的maven库)。

项目运行到最后会报错。

报错解决

报错是因为文件编码的问题,需要修改一个jar包。这个jar包只有执行上面的命令后才会下载下来。

这个jar包的目录可能是这样:

E:.gradle\caches\modules-2\files-2.1\org.asciidoctor\asciidoctor-java-integration\0.1.4\3596c7142fd30d7b65a0e64ba294f3d9d4bd538f

或者你找到**.gradle目录后搜索asciidoctor-java-integration-0.1.4.jar**查找。

在jar包的asciidoctor-java-integration-0.1.4.jar\gems\asciidoctor-0.1.4\lib这个目录下,有一个asciidoctor.rb文件。

在这个文件中找到110行左右,在下面这行代码前添加内容:

FORCE_ENCODING = RUBY_VERSION > '1.9' && Encoding.default_external != Encoding::UTF_8

添加的内容为:

Encoding.default_external = Encoding::UTF_8

修改后的文件为:

# utf8
Encoding.default_external = Encoding::UTF_8

# Flag to indicate whether encoding of external strings needs to be forced to UTF-8
# _All_ input data must be force encoded to UTF-8 if Encoding.default_external is *not* UTF-8
# Address failures performing string operations that are reported as "invalid byte sequence in US-ASCII" 
# Ruby 1.8 doesn't seem to experience this problem (perhaps because it isn't validating the encodings)
FORCE_ENCODING = RUBY_VERSION > '1.9' && Encoding.default_external != Encoding::UTF_8

然后将修改后的asciidoctor.rb覆盖jar包目录中的文件即可。

最后,再次执行:

gradle

经过几分钟的编译就好了。编译成功的输出日志:

E:\Git\spring-framework-reference>gradle
:asciidoctor
:referenceHtmlMulti

BUILD SUCCESSFUL

Total time: 3 mins 56.987 secs

成功后可以在根目录下的build中看到生成的内容。

目前为了节省编译时间,现在只生成了分章节的html。

项目点评 ( 0 )

你可以在登录后,发表评论

搜索帮助

12_float_left_people 12_float_left_close