I am currently working in a Spring Boot project with Spring Integration flow. I have the following Spring Integration xml:
<!-- CHANNELS -->
<int:channel id="channelInput"/>
<int:channel id="channelOutput"/>
<int-http:inbound-gateway id="http-inbound-gateway"
request-channel="channelInput"
reply-channel="channelOutput"
supported-methods="GET"
path="/urlTest"
>
<int-http:request-mapping consumes="application/json"
produces="application/json"/>
</int-http:inbound-gateway>
<int:service-activator input-channel="channelInput"
ref="serviceClassImpl"
method="testMethod"
output-channel="channelOutput">
</int:service-activator>
When I tried to do a curl against localhost:8080/urlTest it gives me a 404.
Later I noticed we have a Jersey resource config class, in which one we have to register all the paths defined with the @Path annotation, so I suppose that 404 error is because I don't register that path in Jersey. But I am not sure, because I have never worked before with Jersey.
@Component
public class ApplicationJerseyConfig extends ResourceConfig {
public ApplicationJerseyConfig() {
property(ServletProperties.FILTER_STATIC_CONTENT_REGEX,"/(info|browser/.*|api/(swagger.json|info)?|.*/api-docs.?|console/.*|configuration/.*|.*.html|.*.jpg|.*.gif|.*.png|.*.map|.*.js|.*.css|.*.ttf)?");
register(TestRest.class);
}
}
How can I register the path defined in the gateway, "/urlTest", in the Jersey Resource Config?
Thank you in advance.