Transient
Excludes a configuration field from serialization and deserialization.
Fields annotated with @Transient are ignored when reading from or writing to the YAML configuration file. Use this for computed properties, internal state, or fields that should only exist in memory.
Usage:
data class AppConfig(
val name: String = "my-app",
@Transient
val startedAt: Long = System.currentTimeMillis(),
@Transient
val isDebugBuild: Boolean = false
)Content copied to clipboard
Since
1.0