Hi

Use the platform-http for the consumer - then you use what spring comes
with as http server.


On Thu, Sep 21, 2023 at 1:04 PM Alphonse Bendt <alphonse.be...@gmail.com>
wrote:

> Hi folks,
>
> Within a Spring boot application I want to use camel-rest as consumer to
> be able to define rest endpoints:
>
> from(„rest://get/hello-world“).constant(„Some static content“)
>
> This works fine with the spring-boot-starter-web which uses Tomcat:
>
> Get http://localhost:8080/rest/hello-world => 200
>
> Now I was trying to achieve the same with spring-boot-starter-webflux +
> netty
>
> What I did so far is:
> * exchange spring-boot-starter-web with spring-boot-sterter-webflux
> * add camel-netty-http
> * configured the rest component to use netty-http instead of servlet:
> getRestConfiguration().setComponent("netty-http“)
>
> I can see in the log output that the route still is being registered
> however cannot be accessed in the spring application
> Get http://localhost:8080/rest/hello-world => 404
>
> I am assuming that a new ServerPort is being opened instead of hooking
> into the one already provided by spring?
>
> How do i configure things so that the rest endpoint is accessible via the
> Spring server port? Can anyone show me directions?
>
> Thanks in advance,
>    Alphonse
>
>
>
>

-- 
Claus Ibsen
-----------------
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to