mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-18 00:24:20 +00:00
doc[zfoo]: update doc
This commit is contained in:
@@ -126,7 +126,7 @@ HotSwapUtils.hotswapClass(bytes);
|
||||
|
||||
```
|
||||
// 无需自己写sql和任何配置,直接通过注解定义在数据库中定义一张表
|
||||
@EntityCache(cacheStrategy = "tenThousand", persister = @Persister("time30s"))
|
||||
@EntityCache
|
||||
public class UserEntity implements IEntity<Long> {
|
||||
@Id
|
||||
private long id;
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ HotSwapUtils.hotswapClass(bytes);
|
||||
|
||||
```
|
||||
// You don't need to write sql and any configuration yourself, define a table in the database directly through annotation definitions
|
||||
@EntityCache(cacheStrategy = "tenThousand", persister = @Persister("time30s"))
|
||||
@EntityCache
|
||||
public class UserEntity implements IEntity<Long> {
|
||||
@Id
|
||||
private long id;
|
||||
|
||||
+3
-3
@@ -56,14 +56,14 @@ var collection = OrmContext.getOrmManager().getCollection(UserEntity.class)
|
||||
|
||||
<!-- 缓存策略 -->
|
||||
<orm:caches>
|
||||
<orm:cache strategy="hundred" size="100" expire-millisecond="600000"/>
|
||||
<orm:cache strategy="default" size="6000" expire-millisecond="600000"/>
|
||||
<orm:cache strategy="thousand" size="1000" expire-millisecond="600000"/>
|
||||
<orm:cache strategy="threeThousand" size="3000" expire-millisecond="600000"/>
|
||||
</orm:caches>
|
||||
|
||||
<!-- 持久化策略 -->
|
||||
<orm:persisters>
|
||||
<orm:persister strategy="cronDefault" type="cron" config="0,30 * * * * ?"/>
|
||||
<orm:persister strategy="default" type="time" config="600000"/>
|
||||
<orm:persister strategy="cron30s" type="cron" config="0/30 * * * * ?"/>
|
||||
<orm:persister strategy="time30s" type="time" config="30000"/>
|
||||
</orm:persisters>
|
||||
@@ -76,7 +76,7 @@ address表示数据库的地址,支持分片的配置
|
||||
- 通过注解引入映射
|
||||
|
||||
```
|
||||
@EntityCaches(cacheStrategy = "tenThousand", persister = @Persister("time30s"))
|
||||
@EntityCaches(cacheStrategy = @Cache("tenThousand"), persister = @Persister("time30s"))
|
||||
public class UserEntity implements IEntity<Long> {
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
<!-- 持久化策略 -->
|
||||
<orm:persisters>
|
||||
<orm:persister strategy="default" type="cron" config="0,30 * * * * ?"/>
|
||||
<orm:persister strategy="default" type="time" config="600000"/>
|
||||
<orm:persister strategy="cron30s" type="cron" config="0/30 * * * * ?"/>
|
||||
<orm:persister strategy="time30s" type="time" config="30000"/>
|
||||
</orm:persisters>
|
||||
|
||||
Reference in New Issue
Block a user