-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f4a3cce
commit 4e6ae7b
Showing
2 changed files
with
8 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
sample/src/main/java/com/drake/net/sample/constants/UserConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
package com.drake.net.sample.constants | ||
|
||
import com.drake.serialize.serialize.annotation.SerializeConfig | ||
import com.drake.serialize.serialize.serialLazy | ||
|
||
|
||
/** | ||
* 建议使用 https://github.com/liangjingkanji/Serialize 为字段提供持久化存储 | ||
* 本单例类使用 https://github.com/liangjingkanji/Serialize 为字段提供持久化存储 | ||
*/ | ||
@SerializeConfig(mmapID = "user_config") | ||
object UserConfig { | ||
|
||
var token = "6cad0ff06f5a214b9cfdf2a4a7c432339" | ||
var token by serialLazy(default = "6cad0ff06f5a214b9cfdf2a4a7c432339") | ||
|
||
var isLogin = true | ||
var isLogin by serialLazy(default = false) | ||
} |