Camel Karavan : Servlet as component to rest configuration. #1240
-
Ask a questionI am adding my spring boot code to karavan to build route of an API. In my code, there is a common class for route builder that has this line. I see that servlet is being added as component to the rest configuration. So, I tried to do that on karavan by going to REST>Create configuration and selected the component as servlet from the dropdown. Error:2024-04-23 04:23:25.089 WARN 15 --- [ ReloadOnDemand] support.RouteOnDemandReloadStrategy : Error reloading routes due to Failed to create route route-a27c: Route(route-a27c)[From[rest:post:/LoanAccountDetails] -> [pr... because of Failed to resolve endpoint: rest://post:/LoanAccountDetails due to: No RestConfiguration for component: platform-http found, RestConfiguration targets: servlet. This exception is ignored. Here is my route on karavan.
Can someone please guide me in adding servlet as component? I tried adding 'Consumer Component Name' of my 'from' REST component on my route itself. But, it doesn't work. When I make my API call, I get 404. Without, this modification, it works fine. VariantWeb Application Container Management (if applicable)Docker Operating System (if applicable)Windows Version4.4.0 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
do not use servlet, you should use platform-http which is the default, so you do not have to configure it. |
Beta Was this translation helpful? Give feedback.
-
karavan comes with platform-http as its supported http server, so use that |
Beta Was this translation helpful? Give feedback.
Karavan ui is ALL of camel and shows everything - also older http servers like jetty and coap for mqtt protocols.
But when you run in karavan web it runs only in vanilla camel standalone, and platform-http is only supported there (auto detected so you dont need to select anyway).