mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-03 11:12:53 +00:00
docs: Translate Chinese comments into English across multiple modules and fix grammatical issues
This commit is contained in:
1 parent
ee54ea26c3
commit
f565a86c23
14 files changed
+61
-56
No files matched your search
+3
-3
@@ -105,7 +105,7 @@
|
||||
<version>${zfoo.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 依赖的测试库 -->
|
||||
<!-- Test dependencies -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
@@ -179,7 +179,7 @@
|
||||
</plugin>
|
||||
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
@@ -250,7 +250,7 @@
|
||||
</build>
|
||||
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<name>boot</name>
|
||||
<description>zfoo boot makes it easy to create Spring Boot application using zfoo by using auto-configure</description>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
@@ -147,7 +147,7 @@
|
||||
</plugin>
|
||||
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
@@ -217,7 +217,7 @@
|
||||
</build>
|
||||
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<name>event</name>
|
||||
<description>zfoo event is used to decouple different modules and improve the quality of the code</description>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
@@ -159,7 +159,7 @@
|
||||
</plugin>
|
||||
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
@@ -230,7 +230,7 @@
|
||||
</build>
|
||||
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<name>hotswap</name>
|
||||
<description>zfoo hotswap can update code without shutdown the server</description>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
@@ -152,7 +152,7 @@
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
</plugin>
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
@@ -223,7 +223,7 @@
|
||||
</build>
|
||||
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<name>monitor</name>
|
||||
<description>zfoo monitor is lightweight cpu, memory, hard disk, network monitoring</description>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
@@ -66,7 +66,7 @@
|
||||
<version>${zfoo.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 依赖的通信类库 -->
|
||||
<!-- Network communication libraries -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>io.netty</groupId>-->
|
||||
<!-- <artifactId>netty-all</artifactId>-->
|
||||
@@ -207,7 +207,7 @@
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
</plugin>
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
@@ -278,7 +278,7 @@
|
||||
</build>
|
||||
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<name>net</name>
|
||||
<description>zfoo net is asynchronous, actor design, lock-free, universal RPC framework</description>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<net:address name="firstZookeeper" url="127.0.0.1:2181"/>
|
||||
</net:registry>
|
||||
|
||||
<!--1.声明自己是个消费者 2.消费的接口是服务提供者是myProvider1提供的具体实现-->
|
||||
<!--1. Declare this node as a consumer 2. The consumed interface is the concrete implementation provided by myProvider1-->
|
||||
<net:consumers>
|
||||
<net:consumer consumer="provider1"/>
|
||||
</net:consumers>
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
<!-- native: internal messages; common: shared by all modules; js: web-facing protocol that generates JavaScript files -->
|
||||
<protocols>
|
||||
|
||||
<!-- 配置包名称,会扫描包底下所有被@Protocol注解标注的协�?-->
|
||||
<!-- Configure the package name; all classes annotated with @Protocol under the package will be scanned -->
|
||||
<module id="1" name="native">
|
||||
<protocol location="com.zfoo.net.router.attachment"/>
|
||||
</module>
|
||||
|
||||
<!-- Specifying protocol IDs in XML provides a centralized overview of the ID space -->
|
||||
<module id="2" name="common">
|
||||
<!-- 不写协议号,会使用协议里的@Protocol注解的id当做协议�?-->
|
||||
<!-- If the protocol ID is not specified here, the id from the @Protocol annotation will be used -->
|
||||
<protocol location="com.zfoo.net.packet.common.Message"/>
|
||||
<protocol location="com.zfoo.net.packet.common.Error"/>
|
||||
<protocol location="com.zfoo.net.packet.common.Heartbeat"/>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<net:address name="${registry.address.name}" url="${registry.address.url}"/>
|
||||
</net:registry>
|
||||
|
||||
<!--1.这里声明自己是服务提供�?2.提供接口是myProviderModule模块下的接口 3.提供者的名字是myProvider1-->
|
||||
<!--1. Declare this node as a service provider 2. The provided interface belongs to the myProviderModule module 3. The provider name is myProvider1-->
|
||||
<!--Multiple providers can be declared for the same module; consumers can select one, enabling provider-group routing-->
|
||||
<net:providers>
|
||||
<net:provider protocol-module="myProviderModule" provider="provider1"/>
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
@@ -170,7 +170,7 @@
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
</plugin>
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
@@ -241,7 +241,7 @@
|
||||
</build>
|
||||
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<name>orm</name>
|
||||
<description>zfoo orm is MongoDB orm framework</description>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<orm:address name="${mongodb.address.name}" url="${mongodb.address.url}"/>
|
||||
</orm:host>
|
||||
|
||||
<!-- 缓存策略 -->
|
||||
<!-- Cache strategy -->
|
||||
<orm:caches>
|
||||
<orm:cache strategy="default" size="6000" expire-millisecond="60000"/>
|
||||
<orm:cache strategy="hundred" size="100" expire-millisecond="60000"/>
|
||||
@@ -33,7 +33,7 @@
|
||||
<orm:cache strategy="threeThousand" size="3000" expire-millisecond="60000"/>
|
||||
</orm:caches>
|
||||
|
||||
<!-- 持久化策略 -->
|
||||
<!-- Persistence strategy -->
|
||||
<orm:persisters>
|
||||
<orm:persister strategy="default" type="time" config="30000"/>
|
||||
<orm:persister strategy="cron30s" type="cron" config="0/30 * * * * ?"/>
|
||||
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
@@ -66,8 +66,8 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- 需要保持和spring-boot-starter-json里的jackson同样的版本-->
|
||||
<!-- json,bytecode generation to replace use of Reflection for field access and method calls(Jackson涡轮增压,字节码增强解析json) -->
|
||||
<!-- Must keep the same version as Jackson in spring-boot-starter-json -->
|
||||
<!-- json, bytecode generation to replace use of Reflection for field access and method calls (Jackson turbocharger) -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.module</groupId>
|
||||
<artifactId>jackson-module-afterburner</artifactId>
|
||||
@@ -218,7 +218,7 @@
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
</plugin>
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
@@ -289,7 +289,7 @@
|
||||
</build>
|
||||
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<name>protocol</name>
|
||||
<description>zfoo protocol is binary serialization framework for Java/C++/js/ts/C#/Go/Lua/GDScript/Python</description>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
@@ -146,7 +146,7 @@
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
</plugin>
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
@@ -217,7 +217,7 @@
|
||||
</build>
|
||||
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<name>scheduler</name>
|
||||
<description>zfoo schedule for time task scheduling bus</description>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
@@ -169,7 +169,7 @@
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
</plugin>
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
@@ -240,7 +240,7 @@
|
||||
</build>
|
||||
|
||||
|
||||
<!-- deploy to maven repository should specify these tag.(部署到maven中央仓库必须指定下面的标签) -->
|
||||
<!-- deploy to maven repository should specify these tags -->
|
||||
<name>storage</name>
|
||||
<description>zfoo storage is Java pojo and excel/csv/json automatic mapping framework</description>
|
||||
<url>https://github.com/zfoo-project/zfoo</url>
|
||||
|
||||
@@ -1,31 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
您也许已经注意到 XML 声明没有关闭标签。这不是错误。声明不属于XML本身的组成部分。
|
||||
它不是 XML 元素,也不需要关闭标签。
|
||||
You may have noticed that the XML declaration has no closing tag. This is not an error.
|
||||
The declaration is not part of the XML document itself.
|
||||
It is not an XML element, so it does not need a closing tag.
|
||||
-->
|
||||
|
||||
<!--
|
||||
默认的命名空间(Default Namespaces)为元素定义默认的命名空间可以让我们省去在所有的子元素中使用前缀的工作。
|
||||
使用语法:xmlns=".......namespaceURI",这样做的原因是每个xml都有一个根元素
|
||||
Default Namespaces: Defining a default namespace for elements allows us to omit
|
||||
the prefix in all child elements.
|
||||
Syntax: xmlns=".......namespaceURI". The reason is that every XML document has a root element.
|
||||
-->
|
||||
|
||||
<!--
|
||||
1.第一步:添加xmlns:xsi属性,引入xsi命名空间
|
||||
2.第二步:添加命名空间,可添加多个,但没有前缀的命名空间最多只能有1个
|
||||
3.第三步:通过xsi命名空间下的属性schemaLocation指定每个命名空间XSD文件的URI,命名空间和相应URI一一对应,多个命名空间用空格分隔
|
||||
本xml文件中要用到某些来自xsi代表的“http://www.w3.org/2001/XMLSchema-instance”这个命名空间的元素
|
||||
比如用来引入无命名空间schema文件的noNamespaceSchemaLocation="XXX";
|
||||
以及引入自带命名空间的schema文件的schemaLocation="XXX"这些元素。
|
||||
这些元素是包含在xsi命名空间中的,所有的xml文件只要引用这些元素 就要引入xsi这个命名空间。
|
||||
xsi这三个字母不是硬性规定,只是大家都这么用,方便阅读而已。
|
||||
xsi是http://www.w3.org/2001/XMLSchema-instance的别名。
|
||||
第一个URI是名称空间的名字,第二个URI给出模式文档的位置
|
||||
Step 1: Add the xmlns:xsi attribute to introduce the xsi namespace.
|
||||
Step 2: Add namespace declarations; multiple can be added, but only one unprefixed namespace is allowed.
|
||||
Step 3: Use the schemaLocation attribute under the xsi namespace to specify the XSD URI for each namespace,
|
||||
pairing each namespace with its URI, separated by spaces.
|
||||
This XML file uses elements from the namespace represented by xsi:
|
||||
"http://www.w3.org/2001/XMLSchema-instance"
|
||||
For example, noNamespaceSchemaLocation="XXX" is used to import schema files without a namespace,
|
||||
and schemaLocation="XXX" is used for schema files with their own namespace.
|
||||
These elements belong to the xsi namespace, so any XML file referencing them must import this namespace.
|
||||
The prefix "xsi" is not mandatory; it is just a widely-used convention for readability.
|
||||
xsi is an alias for http://www.w3.org/2001/XMLSchema-instance.
|
||||
The first URI is the namespace name; the second URI gives the location of the schema document.
|
||||
-->
|
||||
|
||||
<!--
|
||||
一旦您拥有了可用的 XML Schema 实例命名空间:xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
您就可以使用 schemaLocation 属性了。此属性有两个值。第一个值是需要使用的命名空间。
|
||||
第二个值是供命名空间使用的 XML schema 的位置:
|
||||
Once you have the XML Schema instance namespace available: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
you can use the schemaLocation attribute. This attribute takes two values.
|
||||
The first value is the namespace to be used.
|
||||
The second value is the location of the XML schema for that namespace:
|
||||
-->
|
||||
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
@@ -47,11 +52,11 @@
|
||||
<context:component-scan base-package="com.zfoo.storage"/>
|
||||
|
||||
<storage:storage id="resourceManager">
|
||||
<!-- package以及location属性都支持同时指定多个路径,路径分隔符为, ;或者空格-->
|
||||
<!-- Both 'package' and 'location' attributes support multiple paths separated by , ; or space -->
|
||||
<storage:scan package="com.zfoo.**.resource" recycle="false"/>
|
||||
<!-- 如果是类路径以classpath开头,如果是目录文件路径则以file开头,-->
|
||||
<!-- Use 'classpath:' prefix for classpath resources; use 'file:' prefix for filesystem paths -->
|
||||
<storage:resource location="classpath:/,classpath:/excel"/>
|
||||
<!-- <storage:resource location="file:C:\Users\godotg\Desktop\excel"/>-->
|
||||
</storage:storage>
|
||||
|
||||
</beans>
|
||||
</beans>
|
||||
Reference in new issue
Block a user