Make SnapshotSerializerSupplier take a list of SnapshotSerializer's to be able to use beans with non default constructor
Right now we are only able to use
@SerializeUsing(SnapSer.class)
with classes that have a no-arg constructor but this is not strictly necessary 🤔
return serializers.computeIfAbsent(ser, SnapshotSerializerSupplier::instanciate); -> first check if given class is one of the injected
Inject all SnapshotSerializer beans
@otbe I assume it is fine to pick the first match where we either have a default constructor, or we find it in the list? Or you had other priorities in mind?
And what to do if none match (e.g. all Serialisers are beans, but not found in the list), throw SerializerInstantiationException?
Current state: There is some problem and we wait for feedback on that before proceeding, see https://github.com/factcast/factcast/pull/1668#issuecomment-956281582