Skip to content

Commit 2480955

Browse files
garyrussellartembilan
authored andcommitted
INT-4408: PollerSpec Doc Polishing
JIRA: https://jira.spring.io/browse/INT-4408
1 parent 7dc0f5d commit 2480955

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/reference/asciidoc/dsl.adoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,16 @@ The `Pollers` builder factory can be used to configure common bean definitions o
206206
[source,java]
207207
----
208208
@Bean(name = PollerMetadata.DEFAULT_POLLER)
209-
public PollerMetadata poller() {
210-
return Pollers.fixedRate(500).get();
209+
public PollerSpec poller() {
210+
return Pollers.fixedRate(500)
211+
.errorChannel("myErrors");
211212
}
212213
----
213214

214215
See `Pollers` and `PollerSpec` Java Docs for more information.
215216

217+
IMPORTANT: If you use the DSL to construct a `PollerSpec` as a `@Bean`, do not call the `get()` method in the bean definition; the `PollerSpec` is a `FactoryBean` that will generate the `PollerMetadata` object from the specification and initialize all of its properties as needed.
218+
216219
[[java-dsl-endpoints]]
217220
=== DSL and Endpoint Configuration
218221

0 commit comments

Comments
 (0)