Package org.chenile.core.annotation
Annotation Interface ConditionalOnTrajectory
This annotation helps to replace service references with new ones. 
 Let us say, we have a service reference in spring defined as "testService"
 We want to replace this service reference with "testService1" but only if the trajectory id = "t1"
 You can then use this annotation to accomplish this. 
 
// original service that needs to be replaced. @Bean public TestService testService(){ return new TestServiceImpl(); } // replace with this new service only for trajectory id "t1" @Bean @ConditionalOnTrajectory(id = "t1", service = "testService") public TestService testService1(){ return new TestServiceImpl1();}The code above replaces all instances of TestServiceImpl with TestServiceImpl1 but will do so only for trajectory ID "t1"
- Author:
- Raja Shankar Kolluru
- 
Required Element SummaryRequired Elements