Interface InstanceIdResolver
- All Known Implementing Classes:
DefaultInstanceIdResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Resolves the unique identity string for this application instance, used to key per-instance
data in the failover dashboard (snapshot store, Instances tab).
The default implementation (DefaultInstanceIdResolver) produces
<spring.application.name>:<hostname>:<port>, resolved lazily on each call so
local.server.port (set after the embedded server starts) is always captured correctly,
including when server.port=0 (random port).
Declare a bean of this type to override: useful for k8s pod names, Docker container ids,
or an explicit property value such as failover.observable.instance.id.
- Author:
- Anand Manissery
-
Method Summary
-
Method Details
-
resolve
String resolve()Returns a stable, unique string identifying this instance (e.g.myapp:host-1:8080).
-