[英]Spring integration router configuration
我正在努力使用@Router注釋查找示例。 如果我正確理解了javadocs:
@Service
public class AgentServiceImpl implements AgentService {
@Override
@Router(inputChannel = "agentLogin", defaultOutputChannel = "agentServiceResponse")
public AgentLoginResponse login(AgentLoginRequest request) {
}
}
在帶有路由器的xml示例中,有一個服務激活器,我正掛在這里試圖找出它如何適合它。
實際上,您這樣做是錯誤的。 請參閱@Router
JavaDocs:
* Indicates that a method is capable of resolving to a channel or channel name
* based on a message, message header(s), or both.
因此,您用於目標router
組件的login
方法必須返回channel name
或整個MessageChannel
對象。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.