Spring Integration DSL OAuth on Http.outboundGateway
我对Spring-Integration有点陌生,并且一直在尝试POC一些简单的任务。从未接触过OAuth并需要OAuth提供rest服务,我希望有人可以向我展示一个将OAuth与Java DSL一起使用的示例。我目前正在从Rabbit获取一条消息,并将其转换为JAVA POJO,然后将其发送到新通道以发布到Rest服务,但是我需要首先针对服务器进行身份验证。正如我对SI和OAuth所说的那样,并寻找一些建议。我似乎无法在OAuth
的DSL上找到任何东西
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | @Bean public IntegrationFlow amqpInboundGateway(ConnectionFactory connectionFactory, @Value("${rabbitmq.queue}") String queue) { return IntegrationFlows.from(Amqp.inboundGateway(connectionFactory, queue)) .transform(Transformers.toJson()) .transform(Transformers.fromJson(Call.class)) .log(message -> message.getPayload()) .channel("rabbitOutput") .get(); } @Bean public IntegrationFlow httpPostAtms( @Value("${alemba.incident.get}") String uri) { return IntegrationFlows.from("rabbitOutput") .handle(Http.outboundGateway(uri) .httpMethod(HttpMethod.POST) .extractPayload(true)) .transform(Transformers.toJson()) .log() .get(); } |
我对OAuth不熟悉,但是可以使用外部