修复nodeid溢出问题
This commit is contained in:
2
docs/cache-source.md
Normal file
2
docs/cache-source.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# 缓存数据源
|
||||
文档完善中……
|
||||
@@ -4,7 +4,7 @@
|
||||
     2、返回类型必须是可json序列化的 <br>
|
||||
     3、修饰必须是```protected```/```public``` <br>
|
||||
     4、修饰不能是```final```/```static``` <br>
|
||||
  本地缓存和远程缓存可同时设置,```expire```设置为0,表示永不过期。
|
||||
  本地缓存和远程缓存可同时设置,```expire```设置为0,表示永不过期, 支持异步方法(返回类型为```CompletableFuture```)。
|
||||
|
||||
  将结果进行本地缓存30秒且远程缓存60秒
|
||||
```java
|
||||
|
||||
@@ -30,21 +30,21 @@
|
||||
<application nodeid="1000" port="6560" lib="">
|
||||
|
||||
<!--
|
||||
【节点全局唯一】 @since 2.3.0
|
||||
【节点全局唯一】
|
||||
全局Serivce执行的线程池, Application.workExecutor, 没配置该节点将自动创建一个。
|
||||
threads: 线程数,为0表示不启用workExecutor,只用IO线程。默认: CPU核数, 核数=1的情况下默认值为2
|
||||
-->
|
||||
<executor threads="4"/>
|
||||
|
||||
<!--
|
||||
【节点全局唯一】 @since 2.8.0
|
||||
【节点全局唯一】
|
||||
全局Serivce的定时任务设置,没配置该节点将自动创建一个。
|
||||
enabled: 是否开启缓存功能。默认: true
|
||||
-->
|
||||
<schedule enabled="true"/>
|
||||
|
||||
<!--
|
||||
【节点全局唯一】 @since 2.8.0
|
||||
【节点全局唯一】
|
||||
全局Serivce的缓存设置,没配置该节点将自动创建一个。
|
||||
enabled: 是否开启缓存功能。默认: true
|
||||
source: 远程CacheSource的资源名
|
||||
|
||||
2
docs/data-source.md
Normal file
2
docs/data-source.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# DB数据源
|
||||
文档完善中……
|
||||
@@ -272,8 +272,8 @@ public final class Application {
|
||||
this.resourceFactory.register(RESNAME_APP_NAME, String.class, this.name);
|
||||
|
||||
this.resourceFactory.register(RESNAME_APP_NODEID, String.class, this.nodeid);
|
||||
if (Utility.isNumeric(this.nodeid)) {
|
||||
this.resourceFactory.register(RESNAME_APP_NODEID, int.class, Integer.parseInt(this.nodeid));
|
||||
if (Utility.isNumeric(this.nodeid)) { //兼容旧类型
|
||||
this.resourceFactory.register(RESNAME_APP_NODEID, int.class, Math.abs(((Long) Long.parseLong(this.nodeid)).intValue()));
|
||||
}
|
||||
|
||||
this.resourceFactory.register(RESNAME_APP_TIME, long.class, this.startTime);
|
||||
|
||||
Reference in New Issue
Block a user