Hessian serialization is a network protocol that supports dynamic typing, cross-language, and object-based transfer. The binary stream of Java object serialization can be used by other languages (such as C++, Python). Its features include:
In the Dubbo framework, when using the Dubbo communication protocol, Hessian2 is used as the default serialization.
# application.yml (Spring Boot)
dubbo:
protocol:
serialization: hessian2
or
# dubbo.properties
dubbo.protocol.serialization=hessian2
# or
dubbo.consumer.serialization=hessian2
# or
dubbo.reference.com.demo.DemoService.serialization=hessian2
or
<dubbo:protocol serialization="hessian2" />
<!-- or -->
<dubbo:consumer serialization="hessian2" />
<!-- or -->
<dubbo:reference interface="xxx" serialization="hessian2" />