THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
public class MyKuraRouter extends KuraRouter { @Override public void configure() throws Exception { MyService myService = service(MyService.class); ... } } |
If service is not found, a null
value is returned. If you want your application to fail if the service is not available, use requiredService(Class)
method instead. The requiredService
throws IllegalStateException
if a service cannot be not found.
Code Block | ||
---|---|---|
| ||
public class MyKuraRouter extends KuraRouter {
@Override
public void configure() throws Exception {
MyService myService = requiredService(MyService.class);
...
}
} |
KuraRouter activator callbacks
...