[英]Send a message from slack user to another slack user with apache camel
how to configure a spring boot project to Send a message from slack user to another slack user with apache camel?如何配置 spring 引导项目以使用 apache 骆驼从 slack 用户向另一个 slack 用户发送消息?
here is the code need to be configured:这是需要配置的代码:
public class SlackRouter extends RouteBuilder {
@Override
public void configure() throws Exception {
String WEB_HOOK_ROUTE = "https://hooks.slack.com/services/XXXXXXXX/YYYYYYYYYY/ZZZZZZZZZZZZZZZ";
from("direct:testSlack")).to("slack:@slack-user?webhookUrl="+WEB_HOOK_ROUTE);
}
}
You can use the username
property for configuring your producer.您可以使用username
属性来配置您的生产者。
For example:例如:
public class SlackRouter extends RouteBuilder {
@Override
public void configure() throws Exception {
String WEB_HOOK_ROUTE = "https://hooks.slack.com/services/XXXXXXXX/YYYYYYYYYY/ZZZZZZZZZZZZZZZ";
from("direct:testSlack")).to("slack:@slack-user?username=MYUSERNAME&webhookUrl="+WEB_HOOK_ROUTE);
}
} }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.