找不到答案。
春季版本5.0.6。
我的配置:
<int:channel id="data"/>
<int:inbound-channel-adapter
id="dataAdapter"
channel="data"
auto-startup="false"
ref="dataGetter"
method="myMessageSource">
<int:poller max-messages-per-poll="10"/>
</int:inbound-channel-adapter>
<beans:bean
class="org.endpoints.DataGetter"
id="dataGetter"/>
抛出异常:
Configuration problem: A <poller> must have one and only one trigger configuration.
如果没有轮询器:
No poller has been defined for channel-adapter 'dataAdapter', and no default poller is available within the context.
如何正确设置轮询器?
答案 0 :(得分:1)
查看您的配置:
<int:poller max-messages-per-poll="10"/>
您不符合拥有fixed-delay
或fixed-rate
或cron
或仅trigger
引用的条件:https://docs.spring.io/spring-integration/docs/5.0.6.RELEASE/reference/html/messaging-endpoints-chapter.html#endpoint-namespace