mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
feat: redefine PowerAkkaSerializer
This commit is contained in:
parent
e74fc2d138
commit
b746aa1859
@ -9,12 +9,4 @@ import java.io.Serializable;
|
|||||||
* @since 2020/4/16
|
* @since 2020/4/16
|
||||||
*/
|
*/
|
||||||
public interface PowerSerializable extends Serializable {
|
public interface PowerSerializable extends Serializable {
|
||||||
|
|
||||||
/**
|
|
||||||
* request path for http or other protocol, like '/worker/stopInstance'
|
|
||||||
* @return null for non-http request object or no-null path for http request needed object
|
|
||||||
*/
|
|
||||||
default String path() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package tech.powerjob.common.serialize;
|
package tech.powerjob.remote.akka;
|
||||||
|
|
||||||
import akka.serialization.JSerializer;
|
import akka.serialization.JSerializer;
|
||||||
|
import tech.powerjob.common.serialize.SerializerUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Using custom serializers for akka-remote
|
* Using custom serializers for akka-remote
|
||||||
@ -31,3 +32,4 @@ public class PowerAkkaSerializer extends JSerializer {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -9,7 +9,7 @@ akka {
|
|||||||
allow-java-serialization = off
|
allow-java-serialization = off
|
||||||
|
|
||||||
serializers {
|
serializers {
|
||||||
power-serializer = "tech.powerjob.common.serialize.PowerAkkaSerializer"
|
power-serializer = "tech.powerjob.remote.akka.PowerAkkaSerializer"
|
||||||
}
|
}
|
||||||
|
|
||||||
serialization-bindings {
|
serialization-bindings {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user