logo
down
shadow

Apache Camel Rest endpoint with DSL in Spring Boot adds /camel to the path


Apache Camel Rest endpoint with DSL in Spring Boot adds /camel to the path

By : Naeem
Date : October 18 2020, 03:08 PM
like below fixes the issue You can control this in your application.properties or application.yml
e.g
code :
camel.component.servlet.mapping.contextPath=/api/*


Share : facebook icon twitter icon
How to secure Apache Camel rest endpoint with Spring Security and OAuth2

How to secure Apache Camel rest endpoint with Spring Security and OAuth2


By : Rahul Kashyap
Date : March 29 2020, 07:55 AM
will be helpful for those in need As a final solution I decided to use Spring Boot embedded servlet container instead of Apache Camel rest component. So it could be easily secured by Spring Security. This could be done by creating additional beans:
code :
  @Bean
  public ServletRegistrationBean servletRegistrationBean() {
    SpringServerServlet serverServlet = new SpringServerServlet();
    ServletRegistrationBean regBean = new ServletRegistrationBean(serverServlet, "/camel/*");
    Map<String, String> params = new HashMap<>();
    params.put("org.restlet.component", "restletComponent");
    regBean.setInitParameters(params);
    return regBean;
  }

  @Bean
  public Component restletComponent() {
    return new Component();
  }

  @Bean
  public RestletComponent restletComponentService() {
    return new RestletComponent(restletComponent());
  }
Spring-Camel.How to read files from sftp (org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint:)

Spring-Camel.How to read files from sftp (org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint:)


By : Sukant Sharma
Date : March 29 2020, 07:55 AM
it helps some times First of all I installed sftp server locally and I can connect to it using bitwise ssh client: , It is working after I've added
code :
compile group: 'org.apache.camel', name: 'camel-ftp-starter', version: '2.20.0'
How can I avoid putting camel dependency in pojo? : camel-example-spring-boot-rest-jpa :

How can I avoid putting camel dependency in pojo? : camel-example-spring-boot-rest-jpa :


By : Barbershop Meech Pur
Date : March 29 2020, 07:55 AM
Does that help Instead of using @Consumed you can use a custom deleteHandler which you can configure on the JPA endpoint.
Spring Boot Camel Route - get data from rest endpoint

Spring Boot Camel Route - get data from rest endpoint


By : Walter Böhmer
Date : March 29 2020, 07:55 AM
hope this fix your issue I want to create camel route in Spring Boot (2.1.1) project to get the data from some (rest) endpoint (http://localhost:8080/getAllUsers) and to send that data to activeMq. , I will go with your second example:
code :
from("timer://test?repeatCount=1").routeId("newRoute")
    .streamCaching()
    .process(exchange -> exchange.getIn()
        .setBody(exchange.getIn()
            .getBody()))
    .marshal()
    .json(JsonLibrary.Jackson)
    .setHeader(Exchange.HTTP_METHOD, constant("GET"))
    .setHeader(Exchange.CONTENT_TYPE, constant("application/json"))
    .to("http://localhost:8080/getAllUsers")
    .log(LoggingLevel.INFO, "This is my body: ${body}")
    .to("activemq:queue://new-queue");
'No adapter for endpoint' exception - apache-camel with spring-boot & spring-ws

'No adapter for endpoint' exception - apache-camel with spring-boot & spring-ws


By : Nemo Nemo
Date : March 29 2020, 07:55 AM
Hope this helps When spring boot is used, it registers just DefaultMethodEndpointAdapter that configures annotation driven Spring WS programming model. This makes it possible to use the various annotations like @Endpoint, @Payload auto detected.
As in our case, spring-ws endpoint has to hand over ws requests to camel endpoint, DefaultMethodEndpointAdapter won't do that job for us.
shadow
Privacy Policy - Terms - Contact Us © soohba.com