Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion docs/documentation/use-samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class Runner {

public static void main(String[] args) {
Operator operator = new Operator(DefaultConfigurationService.instance());
operator.register(new WebServerController());
operator.register(new WebPageReconciler());
operator.start();
}
}
Expand Down Expand Up @@ -214,6 +214,28 @@ public class Application {
}
```

You will also need a `@Configuration` to make sure that your reconciler is registered:

```java

@Configuration
public class Config {

@Bean
public WebPageReconciler customServiceController() {
return new WebPageReconciler();
}

@Bean(initMethod = "start", destroyMethod = "stop")
@SuppressWarnings("rawtypes")
public Operator operator(List<Reconciler> controllers) {
Operator operator = new Operator();
controllers.forEach(operator::register);
return operator;
}
}
```

#### Spring Boot test support

Adding the following dependency would let you mock the operator for the tests where loading the spring container is
Expand Down