Package org.chenile.core.annotation
Annotation Interface ConditionalHealthCheckOnTrajectory
This annotation will need to be used at the spring
Configuration
class
This annotation does the same thing as ConditionalOnTrajectory
However it does this behaviour for health checkers rather than the services
You can then use this annotation to accomplish this.
:
// original health checker that needs to be replaced for specific trajectories
@Bean public HealthChecker testHealthChecker(){ return new TestHealthChecker(); }
// replace with this new health checker only for trajectory id "t1"
@Bean @ConditionalHealthCheckOnTrajectory(id = "t1", service = "testService")
public HealthChecker testHealthChecker1(){ return new TestHealthChecker1();}
The code above replaces all instances of TestHealthChecker with TestHealthChecker1 but will do so only
for trajectory ID "t1"- Author:
- Raja Shankar Kolluru
-
Required Element Summary