Making a request on a rest api with spring integration and java 11

35 Views Asked by At

I'm currently working on implementing a webservice with spring integration and java 11. My ws is running on docker and I'm trying to do a simple GET on an endpoint but when I launch my context application, I don't see anything in the logs. Is this a configuration problem because I don't understand it, I'm not getting any errors etc? Does anyone know where the problem might be? My application context

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:int="http://www.springframework.org/schema/integration"
       xmlns:int-http="http://www.springframework.org/schema/integration/http"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/integration
                           http://www.springframework.org/schema/integration/spring-integration-5.1.xsd
                           http://www.springframework.org/schema/integration/http
                           http://www.springframework.org/schema/integration/http/spring-integration-http-5.1.xsd">

<int:channel id="requestChannel"/>

<int:channel id="responseChannel"/>

<int-http:outbound-gateway request-channel="requestChannel"
                           reply-channel="responseChannel"
                           url="https://devopsprojectefrei.azurewebsites.net/api/students"
                           http-method="GET"
                           expected-response-type="java.lang.String"/>

<int:logging-channel-adapter id="responseChannel" level="INFO"/>
</beans>

I tried to use a service activator : nothing wrong in the log

the logs :

[main] DEBUG org.springframework.integration.config.GlobalChannelInterceptorProcessor - No global channel interceptors.
[main] DEBUG org.springframework.context.support.DefaultLifecycleProcessor - Starting beans in phase -2147483648
[main] INFO org.springframework.integration.endpoint.EventDrivenConsumer - Adding {http:outbound-gateway} as a subscriber to the 'requestChannel' channel
[main] INFO org.springframework.integration.channel.DirectChannel - Channel 'org.springframework.context.support.ClassPathXmlApplicationContext@50caa560.requestChannel' has 1 subscriber(s).
[main] INFO org.springframework.integration.endpoint.EventDrivenConsumer - started org.springframework.integration.config.ConsumerEndpointFactoryBean#0
[main] DEBUG org.springframework.context.support.DefaultLifecycleProcessor - Successfully started bean 'org.springframework.integration.config.ConsumerEndpointFactoryBean#0'
[main] INFO org.springframework.integration.endpoint.EventDrivenConsumer - Adding {logging-channel-adapter:responseChannel.adapter} as a subscriber to the 'responseChannel' channel
[main] INFO org.springframework.integration.channel.DirectChannel - Channel 'org.springframework.context.support.ClassPathXmlApplicationContext@50caa560.responseChannel' has 1 subscriber(s).
[main] INFO org.springframework.integration.endpoint.EventDrivenConsumer - started responseChannel.adapter
[main] DEBUG org.springframework.context.support.DefaultLifecycleProcessor - Successfully started bean 'responseChannel.adapter'
[main] INFO org.springframework.integration.endpoint.EventDrivenConsumer - Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
[main] INFO org.springframework.integration.channel.PublishSubscribeChannel - Channel 'org.springframework.context.support.ClassPathXmlApplicationContext@50caa560.errorChannel' has 1 subscriber(s).
[main] INFO org.springframework.integration.endpoint.EventDrivenConsumer - started _org.springframework.integration.errorLogger
[main] DEBUG org.springframework.context.support.DefaultLifecycleProcessor - Successfully started bean '_org.springframework.integration.errorLogger'
[main] DEBUG org.springframework.core.env.PropertySourcesPropertyResolver - Found key 'spring.liveBeansView.mbeanDomain' in PropertySource 'systemProperties' with value of type String
0

There are 0 best solutions below