* most convenient for users to include it akka-serialization-jackson and load it when akka-actor-typed is in classpath * provided dependency to akka-actor-typed
84 lines
3.2 KiB
Text
84 lines
3.2 KiB
Text
##########################################
|
|
# Akka Serialization Jackson Config File #
|
|
##########################################
|
|
|
|
# This is the reference config file that contains all the default settings.
|
|
# Make your edits/overrides in your application.conf.
|
|
|
|
#//#jackson-modules
|
|
akka.serialization.jackson {
|
|
|
|
# The Jackson JSON serializer will register these modules.
|
|
# It is also possible to use jackson-modules = ["*"] to dynamically
|
|
# find and register all modules in the classpath.
|
|
jackson-modules += "akka.serialization.jackson.AkkaJacksonModule"
|
|
# AkkaTypedJacksonModule optionally included if akka-actor-typed is in classpath
|
|
jackson-modules += "akka.serialization.jackson.AkkaTypedJacksonModule"
|
|
jackson-modules += "com.fasterxml.jackson.module.paramnames.ParameterNamesModule"
|
|
jackson-modules += "com.fasterxml.jackson.datatype.jdk8.Jdk8Module"
|
|
jackson-modules += "com.fasterxml.jackson.datatype.jsr310.JavaTimeModule"
|
|
jackson-modules += "com.fasterxml.jackson.module.scala.DefaultScalaModule"
|
|
jackson-modules += "com.fasterxml.jackson.module.afterburner.AfterburnerModule"
|
|
#jackson-modules += "com.fasterxml.jackson.datatype.pcollections.PCollectionsModule"
|
|
#jackson-modules += "com.fasterxml.jackson.datatype.guava.GuavaModule"
|
|
}
|
|
#//#jackson-modules
|
|
|
|
#//#compression
|
|
akka.serialization.jackson {
|
|
# The serializer will compress the payload when it's larger than this value.
|
|
compress-larger-than = 10 KiB
|
|
}
|
|
#//#compression
|
|
|
|
akka.serialization.jackson {
|
|
# When enabled and akka.loglevel=DEBUG serialization time and payload size
|
|
# is logged for each messages.
|
|
verbose-debug-logging = off
|
|
|
|
# Define data migration transformations of old formats to current
|
|
# format here as a mapping between the (old) class name to be
|
|
# transformed to the JacksonJsonMigration class that implements
|
|
# the transformation.
|
|
migrations {
|
|
}
|
|
|
|
# Configuration of the ObjectMapper serialization features.
|
|
# See com.fasterxml.jackson.databind.SerializationFeature
|
|
# Enum values corresponding to the SerializationFeature and their boolean value.
|
|
serialization-features {
|
|
|
|
}
|
|
|
|
# Configuration of the ObjectMapper deserialization features.
|
|
# See com.fasterxml.jackson.databind.SeserializationFeature
|
|
# Enum values corresponding to the DeserializationFeature and their boolean value.
|
|
deserialization-features {
|
|
FAIL_ON_UNKNOWN_PROPERTIES = off
|
|
}
|
|
|
|
|
|
}
|
|
|
|
akka.actor {
|
|
serializers {
|
|
jackson-json = "akka.serialization.jackson.JacksonJsonSerializer"
|
|
jackson-cbor = "akka.serialization.jackson.JacksonCborSerializer"
|
|
jackson-smile = "akka.serialization.jackson.JacksonSmileSerializer"
|
|
}
|
|
serialization-bindings {
|
|
# Define bindings for classes or interfaces use Jackson serializer, e.g.
|
|
# "com.example.Jsonable" = jackson-json
|
|
# "com.example.MyMessage" = jackson-cbor
|
|
#
|
|
# For security reasons it is disallowed to bind the Jackson serializers to
|
|
# open ended types that might be target to be deserialization gadgets, such as
|
|
# java.lang.Object, java.io.Serializable, java.util.Comparable
|
|
|
|
}
|
|
serialization-identifiers {
|
|
"akka.serialization.jackson.JacksonJsonSerializer" = 31
|
|
"akka.serialization.jackson.JacksonCborSerializer" = 32
|
|
"akka.serialization.jackson.JacksonSmileSerializer" = 33
|
|
}
|
|
}
|