CORDA-1355: Introduce a dedicated property which controls what is going to be in scope for classpath scanning (#2977)

* CORDA-1355: Introduce a dedicated property which controls what is going to be in scope for classpath scanning

* CORDA-1355: Update change log

* CORDA-1355: Minor change to improve readability.

* CORDA-1355: Custom serializers documentation update to mention new system property.
This commit is contained in:
Viktor Kolomeyko
2018-04-23 13:55:40 +01:00
committed by GitHub
parent bf4d8ba08c
commit 3aaa176dd4
5 changed files with 57 additions and 12 deletions

View File

@ -53,6 +53,8 @@ Unreleased
* java.math.BigInteger serialization support added.
* Fix CORDA-1355: Reduce amount of classpath scanning during integration tests execution.
.. _changelog_v3.1:
Version 3.1

View File

@ -17,11 +17,16 @@ Custom serializer classes should follow the rules for including classes found in
Writing a Custom Serializer
---------------------------
Serializers must
* Inherit from net.corda.core.serialization.SerializationCustomSerializer
* Inherit from ``net.corda.core.serialization.SerializationCustomSerializer``
* Provide a proxy class to transform the object to and from
* Implement the ``toProxy`` and ``fromProxy`` methods
* Be either included into CorDapp Jar or made known to the running process via ``amqp.custom.serialization.scanSpec``
system property.
This system property may be necessary to be able to discover custom serializer in the classpath. At a minimum the value
of the property should include comma separated set of packages where custom serializers located. Full syntax includes
scanning specification as defined by: `<http://github.com/lukehutch/fast-classpath-scanner/wiki/2.-Constructor#scan-spec>`
Serializers inheriting from SerializationCustomSerializer have to implement two methods and two types.
Serializers inheriting from ``SerializationCustomSerializer`` have to implement two methods and two types.
Example
-------