提交 15ffc4c9 编写于 作者: T terrymanu

update docs

上级 6a74c054
......@@ -43,7 +43,7 @@ import java.util.Date;
*
* <p>
* 工作进程Id获取优先级: 系统变量{@code sharding-jdbc.default.key.generator.worker.id} 大于 环境变量{@code SHARDING_JDBC_DEFAULT_KEY_GENERATOR_WORKER_ID}
* ,另外可以调用@{@code CommonSelfKeyGenerator.setWorkerId}进行设置
* ,另外可以调用@{@code DefaultKeyGenerator.setWorkerId}进行设置
* </p>
*
* @author gaohongtao
......
......@@ -78,7 +78,7 @@ TableRule.builder("t_order_item").generateKeyColumns("order_item_id", com.xx.xx.
该标志在Java进程内是唯一的,如果是分布式应用部署应保证每个进程的工作进程Id是不同的。该值默认为0,目前可以通过三种方式设置。
1. 调用静态方法CommonSelfKeyGenerator.setWorkerId("xxxx")设置。
1. 调用静态方法DefaultKeyGenerator.setWorkerId("xxxx")设置。
1. 设置Java的系统变量,也就是再启动命令行中设置-Dsharding-jdbc.default.key.generator.worker.id=xxx设置。
1. 设置系统环境变量,通过SHARDING_JDBC_DEFAULT_KEY_GENERATOR_WORKER_ID=xxx设置。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册