根据这个Lagom doc对于序列化:
Compression, as described here, is only used for persistent events, persistent snapshots and remote messages with the service cluster. It is not used for messages that are serialized in the external API of the service.
我想允许处理请求 header ,例如
Accept-Encoding: gzip, deflate, sdch, br
那么,处理 Lagom 服务对外部应用程序生成的响应压缩的方法是什么,例如网络应用程序?
最佳答案
您想在服务调用中实际处理这个问题,还是想在更高级别上一般处理它?如果你想在更高级别上处理它,那么你需要做的就是启用 Play 的 gzip 过滤器:
https://www.playframework.com/documentation/2.6.x/GzipEncoding
目前仅支持 gzip,但可以对其进行修改以支持其他压缩编码。
关于java - 处理 Lagom 服务响应的压缩,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49831358/